安卓 日常问题 工作日志23

谈一谈安卓的相对布局 

之前只会使用·线性布局 所以要多学一个 

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<LinearLayout
android:id="@+id/buttonLayout"
android:layout_alignParentBottom="true" //重要的一句话 相对布局里 意思是显示在底部
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/operator_menu_bg"
android:orientation="horizontal">
</LinearLayout>
<ScrollView
android:layout_above="@id/buttonLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_tab"
android:padding="10dp">


<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/operator_menu_bg"
android:orientation="vertical">
</LinearLayout>







</ScrollView>







</RelativeLayout>

posted on 2020-04-08 15:58  读书台  阅读(119)  评论(0编辑  收藏  举报

导航