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

  • 相关阅读:
    梦和现实, 哪个更真实呢? 程序的现实? 还是上古的梦?
    C#基础知识总结(一)
    C#学习路线
    C# 成员默认访问权限(public、private、protected、internal)
    C#基础知识总结(二)
    正则表达式C#正则表达式的符号及例子
    Dynamics CRM 2016/365 窗体中添加按钮
    01 tsung安装
    07 tsung 参数化
    02 jmeter 简单发送http请求
  • 原文地址:https://www.cnblogs.com/xingyyy/p/4169428.html
Copyright © 2011-2022 走看看