zoukankan      html  css  js  c++  java
  • Framelayout

    Framelayout的布局是一层一层的显示上去的,按照xml中的framelayout下的一级子控件的先后顺序来进行从底到顶的排列,他们的起点都是左上角。

    但是是集中我们希望改变某一层的位置可以利用

    android:layout_gravity
    android:layout_margin
    来控制

    右上角

    <ImageButton
            android:id="@+id/composer_button_search"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right|top"
            android:layout_marginRight="15dp"
            android:layout_marginTop="10dp"
            android:background="@drawable/ic_launcher" />

    底部横向铺满的布局

    <RelativeLayout
            android:id="@+id/operate"
            android:layout_width="match_parent"
            android:layout_height="70dp"
            android:layout_gravity="bottom"
            android:background="#55336699" >
    
            <ImageButton
                android:id="@+id/composer_button_search"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:layout_marginLeft="55dp"
                android:background="@drawable/personal_center" />
    
            <ImageButton
                android:id="@+id/composer_button_search"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="46dp"
                android:background="@drawable/personal_center" />
    
            <ImageButton
                android:id="@+id/composer_button_search"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignTop="@+id/composer_button_search"
                android:layout_centerInParent="true"
                android:background="@drawable/personal_center" />
        </RelativeLayout>

    Done

  • 相关阅读:
    一千亿亿亿字节
    分布式发布订阅消息系统
    Google Chrome 的内核引擎 WebKit 介绍
    找项目网站C# 下写入视频的简单实现
    学ios开发:Delegate,Action Sheet, Alert
    Web服务器
    Google Chrome Source Code 源码下载
    大数据处理的趋势五种开源技术介绍
    MDA项目思路小结
    重新发布本人所有博客文章中涉及的代码与工具(大部分是C++和Java)
  • 原文地址:https://www.cnblogs.com/xingyyy/p/4169428.html
Copyright © 2011-2022 走看看