这里使用四种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
activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layou...
分类:
移动开发 时间:
2015-07-16 11:57:24
阅读次数:
221
如果要适合于所有的Android版本,可以在多个LinearLayout放置用于显示分隔线的View。例如,放一个ImageView组件,然后将其背景设为分隔线的颜色或图像,分隔线View的定义代码如下:
<ImageView
android:layout_width="fill_parent"
android:layout_height="1dp"...
分类:
移动开发 时间:
2015-07-16 02:12:18
阅读次数:
303
activity_main.xml:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_he...
分类:
其他好文 时间:
2015-07-15 17:07:48
阅读次数:
124
<RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ratingBar"
android:clickable="false"
style="@style...
分类:
移动开发 时间:
2015-07-14 11:20:45
阅读次数:
645