【发布时间】:2016-08-29 16:04:34
【问题描述】:
我正在开发一个 UI,我只想在一个活动中添加两个 FrameLayout。我希望一个 FrameLayout 是填充父(全屏)布局,另一个 FrameLayout 是第一个布局。主要是我想在每个屏幕上的整个应用程序中固定圆形。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/home_menu"
android:layout_weight="1"
android:src="@drawable/ic_home"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/dis__menu"
android:layout_weight="1"
android:src="@drawable/ic_home"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/gallery_menu"
android:layout_weight="1"
android:src="@drawable/ic_home"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/download_menu"
android:layout_weight="1"
android:src="@drawable/ic_home"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/price_menu"
android:layout_weight="1"
android:src="@drawable/ic_home" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/feedb_menu"
android:layout_weight="1"
android:src="@drawable/ic_home"/>
</LinearLayout>
<FrameLayout
android:id="@+id/container_body"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</FrameLayout>
</LinearLayout>
</LinearLayout>
上面的代码将屏幕分成两部分,我想在容器主体FrameLayout上放置菜单。
【问题讨论】:
-
我尝试过线性布局中的两个框架布局。购买我想全屏显示一个框架布局,另一个在菜单上显示
标签: android android-layout android-framelayout