Framelayout
生活随笔
收集整理的這篇文章主要介紹了
Framelayout
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Framelayout的布局是一層一層的顯示上去的,按照xml中的framelayout下的一級(jí)子控件的先后順序來(lái)進(jìn)行從底到頂?shù)呐帕?#xff0c;他們的起點(diǎn)都是左上角。
但是是集中我們希望改變某一層的位置可以利用
android:layout_gravity和 android:layout_margin
來(lái)控制
右上角
<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
?
轉(zhuǎn)載于:https://www.cnblogs.com/xingyyy/p/4169428.html
總結(jié)
以上是生活随笔為你收集整理的Framelayout的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 解决Android手机 屏幕横竖屏切换
- 下一篇: 【C语言学习笔记】字符串拼接的3种方法