我刚刚创建了一个线性布局作为父布局,并且还在此父线性布局内创建了一个相对布局,我只需要将此相对布局的粉红色置于这里的线性布局 的底部是我的xml文件如何在底部的linearlayout中放置相对布局
<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你想在底部的相对布局和顶部的工具栏之间。 或 Recyclerview + framelayout两者都有? –
@Deep Patel感谢您的兴趣我只是想这个相对布局显示在线性布局的底部关于工具栏它应该在顶部我只是想在这个相对布局中放置一个按钮或相对布局在这个相关布局 –