I have a chat screen that contains two views: viewing a recycler to display the previous chat and a custom view that encapsulates the edit text, a submit button and another resizer view so that the user can select other things to send, like photos, etc. This custom view is called the Panel.
So, my chat activity has the following layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<chat.example.app.widget.Panel
style="@style/PanelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:id="@+id/panel" />
<android.support.v7.widget.RecyclerView
android:background="@android:color/holo_red_dark"
android:layout_margin="@dimen/activity_horizontal_margin"
android:scrollbars="vertical"
android:id="@+id/previous_chat"
android:layout_above="@id/panel"
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
and my Panel view has the following layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white">
<RelativeLayout
android:id="@+id/staging_area_root"
android:layout_gravity="center"
android:gravity="center"
android:paddingLeft="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</RelativeLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/card_set"
android:layout_margin="15dp"
android:layout_below="@id/staging_area_root"
android:background="@android:color/holo_blue_bright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
The problem is that the recycler view from Panelcopy all screen space. Therefore, all I see is a problematic view of recyclers from the Panel class.
Both of these types of recycler have LinearLayoutManagerassigned to them. No adapters yet.
build.gradle:
compile 'com.android.support:recyclerview-v7:23.2.0'
Android:
API LayoutManager: ! RecyclerView . , , WRAP_CONTENT RecyclerView, . LayoutManagers .
- ?
1:
0 . .
Update2:
:
