准确的说让Edittext只能输入数字有方法两种,都是通过xml属性设置
方法一:
<EditText
android:id="@+id/u_account"
android:layout_width="0dp"
android:layout_height="match_parent"
andro...
分类:
其他好文 时间:
2015-06-02 18:01:50
阅读次数:
136
项目文档结构步骤一:布局activity_guide.xml
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="co..
分类:
移动开发 时间:
2015-05-30 18:27:20
阅读次数:
152
paint的使用 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout...
分类:
其他好文 时间:
2015-05-30 13:38:23
阅读次数:
111
三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。
(1) fill_parent
设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Windows控件的dockstyle属性大体一致。设置一个顶部布局或控件为fill_parent将强制性让它布满整个屏幕。
(2) wrap_conte...
分类:
移动开发 时间:
2015-05-29 18:05:38
阅读次数:
121
1.准备工作
每一个view,只是img不一样,其他都是一样的
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:la...
分类:
移动开发 时间:
2015-05-29 10:03:45
阅读次数:
129
<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_...
分类:
其他好文 时间:
2015-05-29 06:22:01
阅读次数:
247
自定义一个Dialog,继承了系统Dialog的样式。这时候会发现,即使布局文件中写的width和height都是match_parent,依然无法达到全屏的效果。原因是:系统dialog的样式。默认有padding=10dip,所以即使设置为全屏,也是有10dip的间隙。如果不得不继承这个样式,还...
分类:
移动开发 时间:
2015-05-28 19:40:44
阅读次数:
411
<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_...
分类:
其他好文 时间:
2015-05-28 02:04:50
阅读次数:
206
两个服务互相守护 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layo...
分类:
移动开发 时间:
2015-05-27 23:08:44
阅读次数:
516
通过隐式意图来打开照相机 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
andr...
分类:
其他好文 时间:
2015-05-26 23:32:15
阅读次数:
312