在如下的xml配置文件中,起初对于android:layout_marginBottom,即需要控制imagebutton对于向下的间距,则不能working。

 

        android:id="@+id/bar"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:background="@drawable/ic_bar_bg"
        android:layout_alignParentRight="true"
        android:orientation="horizontal" >

            android:id="@+id/gallery"
            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:id="@+id/bar"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:background="@drawable/ic_bar_bg"
        android:layout_alignParentRight="true"
        android:orientation="horizontal" >

            android:id="@+id/gallery"
            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"/> 

更多相关文章

  1. android layout以及一些常用的android控件属性
  2. Android的源代码结构
  3. Android(安卓)组件属性
  4. android实现TextView多行文本滚动
  5. Android系统中设置TextView的行间距(非行高)
  6. Android(安卓)自定义Menu
  7. 常用的布局和View常用属性
  8. 通过 Android(安卓)SDK Manager 安装面向 Android* 模拟器插件的
  9. Android(安卓)Animation动画 控制动画的执行效果,速度等

随机推荐

  1. Android弹窗页面的三种实现方式
  2. Android平台搭建
  3. Android中XML解析-PULL解析
  4. Android 源码 InputManagerService 启动
  5. Android--使用开源vitamio做万能视频播放
  6. OkHttp源码深度解析
  7. android 中判断WiFi是否可用的可靠方法 ,
  8. Android仿微信朋友圈图片查看器
  9. Android图片处理(Matrix,ColorMatrix)
  10. Android加载器LoaderManager.LoaderCallb