安卓作业: 使用SharedPreference将姓名和年龄信息保存到文件,然后再读取 1.主要xml文件代码: <EditText android:id="@+id/name" android:layout_width="match_parent" android:layout_height="w ...
分类:
其他好文 时间:
2017-05-09 23:11:23
阅读次数:
251
Checkbox有个属性值 <CheckBox android:id="@+id/cb_reg_agree" style="@style/reg_checkbox_style" android:layout_width="wrap_content" android:layout_height="wr ...
分类:
其他好文 时间:
2017-05-01 22:11:51
阅读次数:
124
在android开发中相信大家对ListView、GridView等组建都非常熟悉,在使用它们的时候须要自己配置相关的Adapter,而且配置现骨干的xml文件作为ListView等组建的子View,这些xml文件在Adapter的getView方法中调用。比如: public View getVi ...
分类:
其他好文 时间:
2017-05-01 19:05:36
阅读次数:
309
Android在布局文件里为View提供了onClick属性。用法例如以下: <TextView android:id="@+id/user" android:layout_width="@dimen/px_171" android:layout_height="fill_parent" andro ...
分类:
移动开发 时间:
2017-04-26 20:25:26
阅读次数:
171
1.创建程序: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width=" ...
分类:
移动开发 时间:
2017-04-26 12:59:55
阅读次数:
222
关于xml中经经常使用到边框及边框效果,在此进行一下总结。 3.border(边框及边框效果) (1)直角边框线 <LinearLayout android:layout_width="200dp" android:layout_height="30dp" android:layout_margin ...
分类:
移动开发 时间:
2017-04-25 11:35:42
阅读次数:
198
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" an ...
分类:
移动开发 时间:
2017-04-21 18:54:02
阅读次数:
255
1.宽/高android:layout_width android:layout_height// 取值match_parent //匹配父控件wrap_content //自适应,根据内容 如果指定宽度,请用单位dp 2.控件在父控件中的对齐位置android:layout_gravity 3.控 ...
分类:
移动开发 时间:
2017-04-16 09:34:23
阅读次数:
195
TextView: android:id -- 控件的ID android:layout_width -- 控件的宽度 android:layout_height -- 控件的高度 android:text -- 文本内容 android:textSize -- 文本大小 android:textC ...
分类:
移动开发 时间:
2017-04-09 23:27:46
阅读次数:
270
恢复内容开始 Activity: android:id="@+id/b1 android:layout_width="fill_parent" android:layout_height="wrap_content" android:onClick="dj1" android:text="RED" ...
分类:
移动开发 时间:
2017-04-08 13:51:11
阅读次数:
222