- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 今天对面试题做一个总结
一 string为什么是final这个问题可以从两方面考虑 效率和安全性当string类被声明为final时,其相应的string的方法也为final,能够提高代码的执行效率当string类被声明为final时,表明其不可被继承,也就是说如果有一个string的引用其一定是string对象,而不可能是其他对象二 string中的方法erquals hashcode toendw
2017-03-04 22:25:43
295
原创 Intent可传递的数据类型
1.int, short, float ,double, long, boolean, byte, char 2. String(String实现了 Serializable )/CharSequence实例类型的数据及其数组 3.实现了Parcelable的对象及其数组 4.实现了 Serializable 的对象及其数组 File也可以传递
2016-06-25 21:06:17
845
转载 android:screenOrientation属性
在开发android的应用中,有时候需要限制横竖屏切换。只需要在AndroidManifest.xml文件中加入android:screenOrientation属性限制。android:screenOrientation=”landscape”是限制此页面横屏显示, android:screenOrientation=”portrait”是限制此页面数竖屏显示。 [html] view pla
2016-06-24 20:35:44
256
原创 Android数据持久化的方法
数据持久化:数据可以长久的进行保存,用户可以随时的进行存储和获取。 1.文件IO(直接写入SD卡文件) 2.SQLite数据库 3.使用Preferences 4.ContentProvider ContentPrivider的主要目的是数据共享
2016-06-24 20:29:04
333
原创 Listview的优化与复用
Listview的优化1、convertView重用 2、ViewHolder的子View复用 3、缓存数据复用 代码如下 @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder;
2016-06-11 21:24:50
189
原创 Android常用的Uiutl
public class UIUtils { public static Context getContext() { return GooglePlayApplication.getContext(); } public static Handler getHandler() { return GooglePlayApplication.getH
2016-06-11 20:59:40
309
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人