转自:http://blog.csdn.net/yanfangjin/article/details/7393023

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

<RelativeLayout
        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" >

<ImageButton
            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"/>

</RelativeLayout>

查看很多的blog,对于releated layout的设置有一定的了解,后续测试中,添加了如下的设置android:layout_alignParentBottom="true",则能够使用layout_marginBottom这个特性,因此认为默认的设置,alignParantBottom肯定是false,因此layout_marginBottom不起作用。

<RelativeLayout
        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" >

<ImageButton
            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"/>

</RelativeLayout>

Android Layout XML属性研究--android:layout_marginBottom (转载)的更多相关文章

  1. Android--应用开发3(Android layout XML属性)

    Android layout XML属性 转载:http://www.cnblogs.com/playing/archive/2011/04/07/2008620.html Layout对于迅速的搭建 ...

  2. Android Layout XML属性

    转载自并做少量添加:http://www.cnblogs.com/playing/archive/2011/04/07/2008620.html Layout对于迅速的搭建界面和提高界面在不同分辨率的 ...

  3. 【Android UI】Android Layout XML属性

    Layout对于迅速的搭建界面和提高界面在不同分辨率的屏幕上的适应性具有很大的作用.这里简要介绍Android的Layout和研究一下它的实现. Android有Layout:FrameLayout, ...

  4. Android自定义XML属性以及遇到的命名空间的问题

    转载请注明出处:http://www.cnblogs.com/kross/p/3458068.html 最近在做一些UI,很蠢很蠢的重复写了很多代码,比如一个自定义的UI Tab,由一个ImageVi ...

  5. Android layout 布局 属性详解

    第一类:属性值 true或者 false           android:layout_centerHrizontal 水平居中     android:layout_centerVertical ...

  6. Android layout布局属性、标签属性总结大全

    RelativeLayout 第一类:属性值为true可false android:layout_centerHrizontal        水平居中 android:layout_centerVe ...

  7. android layout 布局属性

    控件属性: android属性 Android功能强大,界面华丽,但是众多的布局属性就害苦了开发者,下面这篇文章结合了网上不少资料, 第一类:属性值为true或false android:layout ...

  8. android 动画xml属性具体解释

    /** * 作者:crazyandcoder * 联系: * QQ : 275137657 * email: lijiwork@sina.com * 转载请注明出处! */ android 动画属性具 ...

  9. Android中控件属性详细总结(转载)

    转载地址:https://www.cnblogs.com/nanguojs/p/5950510.html 1.LinearLayout(线性布局): 可以分为水平线性:android:orientat ...

随机推荐

  1. Linux驱动基础开发

    Linux 内核配置机制(make menuconfig.Kconfig.makefile)讲解 前面我们介绍模块编程的时候介绍了驱动进入内核有两种方式:模块和直接编译进内核,并介绍了模块的一种编译方 ...

  2. pandas入门指南

    上一篇讲了numpy,除此之外,还有一个工具我们一定会使用,那就是pandas.如果说numpy中数据存储形式是列表的话,那么pandas中数据的存储形式更像是字典.为什么这么说呢?因为pandas中 ...

  3. k进制正整数的对k-1取余与按位取余

    华电北风吹 天津大学认知计算与应用重点实验室 日期:2015/8/24 先说一下结论 有k进制数abcd,有abcd%(k−1)=(a+b+c+d)%(k−1) 这是由于kn=((k−1)+1)n=∑ ...

  4. Oracle db中禁止使用sqlplus的方法

    先记录下来: How to Disable a SQL*Plus Connection for a User (文档 ID 124121.1)

  5. addEventListener event

    addEventListener   先看个例子: document.getElementById("myBtn").addEventListener("click&qu ...

  6. ActiveMQ(五) 转

    package pfs.y2017.m11.mq.activemq.demo05; import javax.jms.Connection; import javax.jms.ConnectionFa ...

  7. 使用 C# 开发智能手机软件:推箱子(四)

    这是"使用 C# 开发智能手机软件:推箱子"系列文章的第四篇. 在这篇文章中,介绍 Common/FindPath.cs 源程序文件. using System; using Sy ...

  8. scrollTo(String text) and scrollToExact(String text) method of Android Driver not working

    Using the scrollTo(String text) and scrollToExact(String text) method of Android Driver. However the ...

  9. appium-java-api

    AppiumDriver getAppStrings() 默认系统语言对应的Strings.xml文件内的数据. driver.getAppStrings(String language) 查找某一个 ...

  10. Hadoop_stack_cmd

    HDFS命令基本格式:Hadoop fs -cmd < args > HDFS命令基本格式:Hadoop fs -cmd < args > ls 命令 hadoop fs -l ...