界面activity_main.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"
android:paddingBottom="@dimen/activity_..
分类:
移动开发 时间:
2014-11-17 12:31:37
阅读次数:
295
Android下一行平均分布图片的布局
这是一个很常见的需求,比如有三个图片按钮,需要在底部三个平均,比如下个例子:
以下是布局文件
LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout...
分类:
移动开发 时间:
2014-11-16 07:09:24
阅读次数:
4708
EditText是Android非常常见的属性,但是设置他的高度后,光标在EditText控件的中间显示,于是上网查阅了一下资料,才发现原来只需要设置一个属性就可以让光标从头显示,下面贴上代码<EditText
android:layout_width="fill_parent"
android:layout_height="200dip"
android:l..
分类:
移动开发 时间:
2014-11-13 13:05:31
阅读次数:
149
界面文件activity_main.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"
android:paddingBottom="@dimen/activ..
分类:
移动开发 时间:
2014-11-13 07:13:53
阅读次数:
240
界面activity_main.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"
android:paddingBottom="@dimen/activity_..
分类:
移动开发 时间:
2014-11-13 07:13:43
阅读次数:
253
1.LinearLayout<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<!--<Button-->
<!--android:id="@+id/button1"-..
分类:
移动开发 时间:
2014-11-11 23:01:11
阅读次数:
263
使用ImageView时经常会用到scaleType属性,如:
android:layout_height="50dp"
android:scaleType="matrix"
android:src="@drawable/sample_small" />
scaleType属性的各个值总是记不住之间的区别。今天找点时间总结了一下:
scaleType的属性值有:matr...
分类:
移动开发 时间:
2014-11-11 19:07:49
阅读次数:
190
今日学习了Android常用的控件TextView<TextView
android:id="@+id/text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="24sp"
android:textColor="#00ff00"
android:text="ThisisTextView"/&..
分类:
移动开发 时间:
2014-11-11 02:04:41
阅读次数:
252
从一个页面返回到另一个页面,两种方法:
第一种也是我最常用的一种:
android:id="@+id/linearLayout"
android:layout_width="fill_parent"
android:layout_height="45dp"
...
分类:
其他好文 时间:
2014-11-10 23:26:53
阅读次数:
283
以LinearLayout为例,分析addView()的过程,和对布局参数layout_width和layout_height的理解分析! 安卓新手基础加强。...
分类:
其他好文 时间:
2014-11-07 01:03:49
阅读次数:
319