Android(安卓)Layout XML属性研究--android:layout_marginBottom
在如下的xml配置文件中,起初对于android:layout_marginBottom,即需要控制imagebutton对于向下的间距,则不能working。
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/ic_bar_bg"
android:layout_alignParentRight="true"
android:orientation="horizontal" >
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="10dp"
android:background="@drawable/ic_frame"/>
查看很多的blog,对于releated layout的设置有一定的了解,后续测试中,添加了如下的设置android:layout_alignParentBottom="true",则能够使用layout_marginBottom这个特性,因此认为默认的设置,alignParantBottom肯定是false,因此layout_marginBottom不起作用。
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/ic_bar_bg"
android:layout_alignParentRight="true"
android:orientation="horizontal" >
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"
android:background="@drawable/ic_frame"/>
更多相关文章
- android layout以及一些常用的android控件属性
- Android的源代码结构
- Android(安卓)组件属性
- android实现TextView多行文本滚动
- Android系统中设置TextView的行间距(非行高)
- Android(安卓)自定义Menu
- 常用的布局和View常用属性
- 通过 Android(安卓)SDK Manager 安装面向 Android* 模拟器插件的
- Android(安卓)Animation动画 控制动画的执行效果,速度等