Recyclerview消失了

时间:2017-04-06 07:56:55

标签: android android-recyclerview

我正在使用带有adjustresize选项的xml代码以及用于调整大小的活动,但调整大小后我的recyclerview会消失。

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content_add_document"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.labs108.teddy.activities.AddListActivity"
tools:showIn="@layout/activity_add_list">

<android.support.v7.widget.CardView
    android:id="@+id/card_layout"
    android:layout_width="match_parent"
    android:layout_height="320dp">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <EditText
            android:id="@+id/title"
            android:layout_marginLeft="16dp"
            android:hint="Title"
            android:background="@null"
            android:layout_width="match_parent"
            android:layout_height="52dp" />
        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@drawable/img_divider" />

        <ScrollView
            android:layout_width="match_parent"
            android:scrollbars="vertical"
            android:layout_marginBottom="40dp"
            android:layout_height="262dp">
        <com.github.irshulx.Editor
            android:id="@+id/description"
            android:gravity="top"
            app:render_type="Editor"
            android:paddingTop="10dp"
            android:paddingLeft="10dp"
            android:paddingRight="10dp"
            android:paddingBottom="100dp"
            app:placeholder="Start writing here..."
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        </ScrollView>
        <View
            android:layout_width="match_parent"
            android:layout_height="2dp"
            android:background="@drawable/img_divider" />
    </LinearLayout>
</android.support.v7.widget.CardView>
<RelativeLayout
android:id="@+id/documentlayout"
android:layout_below="@+id/card_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
    android:id="@+id/document_image"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>

<RelativeLayout
    android:id="@+id/rl_add_info_bottom"
    android:layout_width="328dp"
    android:layout_height="48dp"
    android:layout_gravity="center"
    android:layout_marginTop="16dp"
    android:layout_below="@+id/document_image"
    android:background="@drawable/button_white_gradient"
    android:minHeight="@dimen/min_btn_height">

    <TextView
        android:id="@+id/tv_invite_more_bottom"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_marginLeft="@dimen/eight_dp"
        android:text="Add Photo"
        android:textColor="#4ED9CA"
        android:textAppearance="@style/TextAppearance.SFSemibold"
        android:textSize="14sp" />

    <ImageView
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:layout_centerVertical="true"
        android:layout_toLeftOf="@id/tv_invite_more_bottom"
        android:src="@drawable/ic_add" />
   </RelativeLayout>
 </RelativeLayout>
<LinearLayout
    android:id="@+id/bottomLayout"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <ImageButton
        android:maxHeight="20dp"
        android:maxWidth="20dp"
        android:layout_width="40dp"
        android:background="@android:color/transparent"
        android:layout_height="40dp"
        android:src="@drawable/icon_bullet_list"
        android:id="@+id/action_bulleted" />
    <ImageButton
        android:maxHeight="20dp"
        android:maxWidth="20dp"
        android:background="@android:color/transparent"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:src="@drawable/icon_numbered_list"
        android:id="@+id/action_unordered_numbered" />

  </LinearLayout>
 </RelativeLayout>

我希望我的软盘键盘上方,但它有问题。 Adjustpan在这里不起作用。

0 个答案:

没有答案