知识点
来源:互联网 发布:网络维护员的技能 编辑:程序博客网 时间:2024/05/19 22:06
1:去掉窗口标题
requestWindowFeature(Window.FEATURE_NO_TITLE);
2:全屏显示
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN)
3:LauncherActivity
继承此类时,通常要重写Intent intentForPosition(int position)方法。该方法根据不同列表项返回不同的Intent。
4:PreferenceActivity
此类用于进行设置项,这些选项设置会以参数的形式保存,习惯上我们会用Preferences进行保存。
5:当窗口继承Acivity的子类时,那么在onCreate类中不需要setContextView();
6:对于继承Fragment类时,一般要重载onCreateView(LayoutInflater,ViewGroup,Bundle)方法,此方法作用是将返回的View作为Fragment显示的组件
7:对于开发ListFragment的子类时,这时一般不需要重工onCreateView()方法。与ListActivity类似,只要调用ListFragment的setAdapter()方法为改Frament设置Adapter即可
8:android:singleLine意思是设置单行显示。
如果和layout_width一起使用,当文本不能全部显示时,后面用“…”来表示。如 android:text="test_ singleLine " android:singleLine="true" android:layout_width="20dp"
将只显示“t…”。
如果不设置singleLine或者设置为false,文本将自动换行
2):scaleType只对src起作用;bg可设置透明度,比如在ImageButton中就可以用android:scaleType控制图片的缩放方式
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- 知识点
- Linux - 输入和输出
- 巧用box-shadow实现布局区域间隔变色
- Elasticsearch学习(一)
- VirtualBox 4.3.12安装Ubuntu已安装增强工具后,仍然不能调分辨率
- 视频聊天SDK
- 知识点
- LeetCode-226 Invert Binary Tree
- css 伪类选择器 :nth-child(n) 与:nth-of-type(n)的区别
- Android中的性能优化
- CSS学习6(元素框)
- KSDK2.0 + Pins Tool 体验
- 读取txt文件
- UVA 1625 Color Length
- linux之NTP时间同步服务介绍