RatingBar的实现其实是很简单的,只要在xml布局文件中写就行了范例:在主布局文件中,只需要写即可main.xml 1 6 7 15 16 17 18 RatingBar的layout_height和layout_width一般都设置成wrap_con...
分类:
其他好文 时间:
2015-07-20 23:05:24
阅读次数:
276
一、有两种状态: 选中状态(true)、未选中状态(false)二、属性 android:id = "@+id/checkbox" android:layout_width="match_parent" android:layout_height="wrap_content"...
分类:
移动开发 时间:
2015-07-20 21:20:25
阅读次数:
150
上一节学习了利用Intent传值。本节学习利用激活新的Activity获得其返回值。
MainActivity的布局文件如下:
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_cont...
分类:
移动开发 时间:
2015-07-19 16:35:12
阅读次数:
148
这里使用四种onClick单击事件,来实现电话拔号器的DEMO。
XML文件
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="phone"
android:ems="...
分类:
移动开发 时间:
2015-07-19 13:35:26
阅读次数:
125
一、EditText控件的常用属性 android:id——控件的id android:layout_width——控件的宽度 android:layout_height——控件的高度 android:text——文本内容(可以设置默认值) android:te...
分类:
移动开发 时间:
2015-07-18 15:22:56
阅读次数:
181
一、TextView(显示文本框控件) 1、TextView控件的常用属性 android:id——控件的id android:layout_width——控件的宽度 android:layout_height——控件的高度 android:text——文本内容 ...
分类:
移动开发 时间:
2015-07-18 14:02:58
阅读次数:
270
写个简单的安卓计算器 activity_main.xml <LinearLayout?xmlns:android="http://schemas.android.com/apk/res/android"
????android:layout_width="match_parent"
????android:layout_height="match_pa...
分类:
移动开发 时间:
2015-07-18 07:22:45
阅读次数:
193
使用布局文件需要将android:fastScrollEnabled="true" ,如下代码所示:
<ListView
android:id="@+id/listView" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:fastScrollE...
分类:
移动开发 时间:
2015-07-17 02:02:33
阅读次数:
130
<RelativeLayoutandroid:id="@+id/rl_share"android:layout_width="match_parent"android:layout_height="match_parent"android:visibility="gone"><RelativeLayoutandroid:id="@+id/other_layout_top"android:layout_width="match_parent"android:layout_height="150..
分类:
其他好文 时间:
2015-07-16 14:27:15
阅读次数:
134
如果要适合于所有的Android版本,可以在多个LinearLayout放置用于显示分隔线的View。例如,放一个ImageView组件,然后将其背景设为分隔线的颜色或图像,分隔线View的定义代码如下:
<ImageView
android:layout_width="fill_parent"
android:layout_height="1dp"...
分类:
移动开发 时间:
2015-07-16 02:12:18
阅读次数:
303