1

I have a Relative layout at the bottom of the screen. In the mationed layout there is another RelativeLayout for containing a MediaController View. But the MediaController view's height goes outside of it's parent layout height.

How should I solve this problem ?

enter image description here

Main.xml

<?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="match_parent">

    <ListView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/listView2"
        android:layout_margin="4dp"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true" />

    <ImageButton
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:id="@+id/imageButton"
        android:layout_margin="20dp"
        android:visibility="invisible"
        android:background="@drawable/round_button"
        android:src="@android:drawable/ic_menu_share"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#fff"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:id="@+id/bottom_layout">

        <Button
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/qari"
            android:id="@+id/button3"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true" />

        <RelativeLayout
            android:id="@+id/audio"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/button3"
            android:layout_toEndOf="@+id/button3"
            android:layout_alignBottom="@+id/button3"
            android:layout_alignParentTop="true">

        </RelativeLayout>

    </RelativeLayout>
</RelativeLayout>
Ali
  • 508
  • 1
  • 5
  • 16

0 Answers0