3

My activity have complex layout such as expandableListView and recyclerView in one layout. I have following the answer from https://stackoverflow.com/a/19845401/4226651 it solve my problem for the simple layout, but the expandable and recycler still overlap.

This is my layout

    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginTop="27dp"
    android:layout_marginBottom="27dp"
    android:layout_marginLeft="48dp"
    android:layout_marginRight="48dp"
    android:orientation="vertical"
    android:weightSum="1080">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="208"
        android:layout_gravity="center">

        <include layout="@layout/frame_top_home"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"/>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="872"
        android:orientation="horizontal"
        android:weightSum="1920">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1323">

            <ExpandableListView
                android:id="@+id/exp_category"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:listSelector="@drawable/custom_selector"
                android:groupIndicator="@null"
                android:scrollbars="none"
                android:divider="@null" />

        </RelativeLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="597"
            android:orientation="vertical">

            <FrameLayout
                android:id="@+id/content"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

        </LinearLayout>

    </LinearLayout>


</LinearLayout>

Any suggestion how to solve it?

Community
  • 1
  • 1
wanz
  • 302
  • 1
  • 5
  • 17
  • you gave match parent to width so it will take whole place in any device – curiousMind Dec 19 '15 at 09:29
  • yes, it will take whole place with percentage i have set in layout_weight. But i want the child of that view will scaling to the any resolution too – wanz Dec 19 '15 at 09:38

0 Answers0