Android学习笔记(二)
来源:互联网 发布:网狐荣耀 源码 编辑:程序博客网 时间:2024/05/11 16:06
1.android:gravity="center_horizontal"(这个是线性布局中的标签属性) android:layout_centerHorizontal="true"(这个是相对布局中的标签属性)
2.在LinearLayout中 android:layout_marginBottom 属性不起作用,只有 android:layout_marginTop才起作用,因为线性布局是从上到下进行排版的,
3.界面设计最好用相对布局,若用线性布局手机横屏后,由于界面高度不适应,则还需设置滚动条,这样一来比较麻烦!!
4. <Button
android:id="@+id/register"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="2dp"
android:layout_below="@id/othinfo"
android:text="@string/register" />
button按钮不能置底,把android:layout_below="@id/othinfo"语句删了后 就Ok啦!!!
5.编码规范问题:控件的id要规范:控件名_id名
6.实现软件的多种语言版本问题:
在res文件夹下新建一个文件夹,比如中文版本,文件名values-zh-rCN,在该 文件夹下新建一个strings.xml文件,然后在该文件中编写代码,系统会自动 识别语言!
2.在LinearLayout中 android:layout_marginBottom 属性不起作用,只有 android:layout_marginTop才起作用,因为线性布局是从上到下进行排版的,
3.界面设计最好用相对布局,若用线性布局手机横屏后,由于界面高度不适应,则还需设置滚动条,这样一来比较麻烦!!
4. <Button
android:id="@+id/register"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="2dp"
android:layout_below="@id/othinfo"
android:text="@string/register" />
button按钮不能置底,把android:layout_below="@id/othinfo"语句删了后 就Ok啦!!!
5.编码规范问题:控件的id要规范:控件名_id名
6.实现软件的多种语言版本问题:
在res文件夹下新建一个文件夹,比如中文版本,文件名values-zh-rCN,在该 文件夹下新建一个strings.xml文件,然后在该文件中编写代码,系统会自动 识别语言!
- Android学习笔记(二)
- Android学习笔记(二)
- android学习笔记(二)
- android学习笔记(二)
- android 学习笔记(二)
- Android学习笔记(二)
- android学习笔记(二)
- Android学习笔记(二)
- android学习笔记(二)
- Android学习笔记(二)
- Android学习笔记(二)
- android学习笔记(二)
- Android学习笔记(二)
- Android:学习笔记(二)
- Android学习笔记(二)
- android学习笔记(二)
- Android学习笔记(二)
- Android学习笔记(二)
- python传参方式
- android 获取手机屏幕分辨率和setRequestedOrientation设置屏幕方向
- Py 文件操作
- 程序人生之我们的故事:十年如歌(序)
- 阿里新浪微博战略合作 业界人士热议
- Android学习笔记(二)
- Linux下的TCP通信
- 优酷土豆合并一年:依然处于烧钱状态
- 马云的SNS之梦有了新目标 收购“微博”
- 李彦宏:百度在华尔街是最不听话的
- @property 解析
- 配套自测连载(一)
- 厦门人才网简历刷新器V1.2
- Myeclipse 9.0优化方法汇总