親レイアウトとして直線レイアウトを作成し、この親線形レイアウト内に相対レイアウトを作成しました。この相対レイアウトをピンクの色でリニアレイアウト の下部には、ここに私のxmlファイル下の線図レイアウトに相対レイアウトを配置する方法
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:context="abtech.waiteriano.com.waitrer.MenuActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize" />
<!-- A RecyclerView with some commonly used attributes -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"></FrameLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="#ff6b6b"
android:gravity="bottom"
android:layout_alignParentBottom="true">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="60dp"
android:background="#ff6b6b"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true">
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:src="@drawable/fire" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
を交換してください下のほうにある相対レイアウトと上にあるツールバーの間に配置します。 または Recyclerview + framelayout両方ですか? –
あなたの興味のために@Deep Patel私はちょうどこれが欲しいRelativeレイアウトは、それがトップにあるべきであるツールバーについての線形レイアウトの一番下に示されています私はちょうどこのrelativelayoutのボタンまたは相対レイアウトからこの相対レイアウトを入れたい –