Android 基础UI组件
文章平均质量分 68
zhenggy_
爱生活,爱编程
展开
-
Toast 显示文本,图片,及图文
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_p原创 2015-09-01 11:22:02 · 945 阅读 · 0 评论 -
ToggleButton,Switch,RatingBar的使用
<ToggleButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:textOff="2" android:textOn="1" /> <Switch android:layout_wid原创 2015-09-05 13:57:03 · 392 阅读 · 0 评论 -
TimePicker 和 DatePicker 的基本使用
TimePicker 和 DatePicker 的基本使用http://wear.techbrood.com/guide/topics/ui/controls/pickers.html#官方讲的挺详细。1.在xml文件中新建按钮,设置单击事件,以便显示 <Button android:layout_width="match_parent" andr原创 2015-09-10 11:12:34 · 1401 阅读 · 0 评论 -
CheckBox控件及OnCheckedChangeListener监听器的使用,RadioGroup及RadioButton的使用
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_par原创 2015-09-04 20:40:59 · 1095 阅读 · 0 评论 -
AlertDialog的几种使用形式
AlertDialog的几种形式1.基本的样式 <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:onClick="showAlertDialog1" android:text="3个按钮的AlertD原创 2015-09-08 20:48:25 · 483 阅读 · 0 评论 -
Button 样式及selector选择器
<Button android:id="@+id/button7" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/button6" android:text="按钮的s原创 2015-09-04 09:52:19 · 914 阅读 · 0 评论 -
ProgressBar的使用
ProgressBar的使用1.简单使用 <ProgressBar style="?android:attr/progressBarStyleHorizontal" //条状 android:layout_width="wrap_content" android:layout_height="wrap_content" a原创 2015-09-08 12:37:06 · 485 阅读 · 0 评论 -
Button的3种单击事件监听器设置
<Button android:id="@+id/button4" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/edit_text1" android:onClic原创 2015-09-02 10:17:55 · 1503 阅读 · 0 评论 -
EditText控件及相关操作
<EditText android:id="@+id/edit_text1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/button3" android:drawa原创 2015-09-01 20:40:28 · 446 阅读 · 0 评论 -
Spinner下拉列表组件的3种数据绑定方式
1.使用xml中的属性值 绑定 xml中字符串资源<Spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:entries="@array/spin原创 2015-09-07 19:54:12 · 5698 阅读 · 0 评论