Framelayout
生活随笔
收集整理的這篇文章主要介紹了
Framelayout
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Framelayout的布局是一層一層的顯示上去的,按照xml中的framelayout下的一級子控件的先后順序來進行從底到頂的排列,他們的起點都是左上角。
但是是集中我們希望改變某一層的位置可以利用
android:layout_gravity和 android:layout_margin
來控制
右上角
<ImageButtonandroid: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" />底部橫向鋪滿的布局
<RelativeLayoutandroid:id="@+id/operate"android:layout_width="match_parent"android:layout_height="70dp"android:layout_gravity="bottom"android:background="#55336699" ><ImageButtonandroid: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" /><ImageButtonandroid: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" /><ImageButtonandroid: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
?
轉載于:https://www.cnblogs.com/xingyyy/p/4169428.html
總結
以上是生活随笔為你收集整理的Framelayout的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解决Android手机 屏幕横竖屏切换
- 下一篇: 【C语言学习笔记】字符串拼接的3种方法