最近有个xml布局文件,我说下大概意思:
......
......
大家可以看到在RelativeLayout布局的上面是ScrollView,ScrollView里面包含Edittext元素,每次我点击输入东西的时候,底部的RelativeLayout总是被推上去,很麻烦,搜了好多,在stackoverFlow找到了解决方法,也很简单:
an...
分类:
移动开发 时间:
2015-08-13 22:27:56
阅读次数:
165
1.创建安卓项目KSoapTest
2.一路Next
3.添加ksoap2-android-assembly-3.1.0-jar-with-dependencies.jar到项目
(稍后的完整项目下载后会包含这个jar包)
4.编辑 activity_main.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk...
分类:
移动开发 时间:
2015-08-13 14:27:38
阅读次数:
125
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:lay...
分类:
其他好文 时间:
2015-08-13 12:18:59
阅读次数:
86
LinearLayout和RelativeLayout共有属性:java代码中通过btn1关联次控件android:id="@+id/btn1"控件宽度android:layout_width="80px"//"80dip"或"80dp"android:layout_width =“wrap_con...
分类:
其他好文 时间:
2015-08-13 11:52:43
阅读次数:
103
*********************************************跟上一篇效果一样***********************************
activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:to...
分类:
其他好文 时间:
2015-08-12 19:41:10
阅读次数:
127
效果图:
activity的布局xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
andro...
分类:
移动开发 时间:
2015-08-12 13:23:34
阅读次数:
162
RelativeLayout又称为相对布局,也是一种常用的布局形式。和LinearLayout的排列规则不同,RelativeLayout显得更加随意一下,它通常通过相对定位 的方式让控件出现在布局的任何位置。也正是因为如此,RelativeLayout中的属性非常多,不过这些属性都是有规律...
分类:
移动开发 时间:
2015-08-11 20:41:44
阅读次数:
146
源码里看下就知道了。。 -1不代表宽度,代表MATCH_PARENT常量的值public static final int FILL_PARENT = -1;public static final int MATCH_PARENT = -1;public static final int WRAP_...
分类:
其他好文 时间:
2015-08-11 13:36:16
阅读次数:
136
对应若水老师的第十一课,十二课
一,absolutelayout
绝对布局,可以用android:layout_x或y来指定绝对坐标,这个布局中android:orientation就无效了(只对线性布局有效)
这种布局的缺点是缺乏灵活性,不易维护
二,framelayout
框架布局,层叠式,有点像堆栈,先进在底层,会被后进的覆盖.
可以用android:layout_gravi...
分类:
移动开发 时间:
2015-08-10 00:26:42
阅读次数:
144
线性布局
线性布局是将放入其中的组件按照垂直(vertical)或者水平(horizontal)方向来布局,
也就是控制其中组件横向排列或者纵向排列。在线性布局中
每一行【针对垂直排列】或每一列【针对水平排列】只能放一个组件
。
注意:Android线性布局不会换行,当组件一个挨着一个排列到窗体边缘后
剩下的组件将不会显示出来
排列方式由android:orientation...
分类:
移动开发 时间:
2015-08-08 12:13:11
阅读次数:
488