Android: is there a way to correctly set the width and height of a SlidingDrawer to half the screen?

I have to install SlidingDrawer on the right side, and on click it should not expand half-screen. I saw many tutons, and I managed to install it more or less correctly, but currently it pushes everything in the layout on the left. Here is my xml:

<LinearLayout android:layout_height="wrap_content"
    android:id="@+id/edition_content_linear" android:layout_width="fill_parent"
    android:layout_weight="1" android:background="@android:color/white">

    <LinearLayout android:layout_width="fill_parent"
        android:id="@+id/static_menu_layout" android:layout_height="fill_parent"
        android:layout_weight="2" android:visibility="gone" android:background="@drawable/ipad_category_back">

        <ExpandableListView android:id="@+id/static_expandable_list"
            android:layout_height="fill_parent" android:layout_width="fill_parent"
            android:drawSelectorOnTop="false" android:groupIndicator="@drawable/expandablelist_selector" android:indicatorLeft="210dp" android:indicatorRight="230dp"></ExpandableListView>

    </LinearLayout>

    <LinearLayout android:id="@+id/center_linear"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:layout_weight="1">

        <ImageView android:scaleType="centerInside"
            android:layout_height="fill_parent" android:layout_width="fill_parent"
            android:id="@+id/cover_image_big"></ImageView>

        <WebView android:id="@+id/story_webview"
            android:layout_height="fill_parent" android:layout_width="fill_parent"
            android:visibility="gone"></WebView>

    </LinearLayout>

    <SlidingDrawer android:id="@+id/slider_drawer"
    android:layout_width="250dp" android:layout_height="500dp"
    android:orientation="horizontal" android:layout_gravity="center_vertical"
    android:handle="@+id/slider_handle" android:content="@+id/slider_expandable_list_container">

    <ImageView android:id="@+id/slider_handle"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:src="@drawable/menu_handler" />

    <RelativeLayout android:id="@+id/slider_expandable_list_container"
        android:layout_height="500dp" android:layout_width="250dp">
        <ExpandableListView android:id="@+id/slider_expandable_list"
            android:layout_height="fill_parent" android:layout_width="fill_parent"
            android:drawSelectorOnTop="false" android:indicatorLeft="210dp" android:layout_gravity="center_vertical"
            android:indicatorRight="230dp" android:groupIndicator="@drawable/expandablelist_selector"></ExpandableListView>

    </RelativeLayout>

   </SlidingDrawer>

</LinearLayout>
+3
source share
1 answer

. Framelayout . , . , Framelayout . , .

+4

Source: https://habr.com/ru/post/1789463/