I have a LinearLayout that I want when it gets VISIBLE it overlaps a listview, how do I do that? I want my LinearLayout option to override the listview when it is set to VISIBLE.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/opcaoOrdenar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/linearLayout"
android:gravity="center"
android:weightSum="1"
android:visibility="gone">
<RadioGroup
android:id="@+id/radioGroupData"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.36"
android:orientation="vertical"
>
<RadioButton
android:id="@+id/maiorData"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="Maior data" />
<RadioButton
android:id="@+id/menorData"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/questao"
android:layout_toEndOf="@+id/sim"
android:text="Menor data" />
</RadioGroup>
<RadioGroup
android:id="@+id/radioGroupResultado"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true">
<RadioButton
android:id="@+id/melhorResultado"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/questao"
android:layout_toEndOf="@+id/sim"
android:text="Melhor resultado" />
<RadioButton
android:id="@+id/piorResultado"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/questao"
android:layout_toEndOf="@+id/sim"
android:text="Pior resultado" />
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/cinza">
<Button
android:id="@+id/ordenaramc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="@color/azulgerdau"
android:text="Ordenar"
android:textColor="@color/cinza" />
<Button
android:id="@+id/buscarAmc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="@color/azulgerdau"
android:onClick="buscarAmc"
android:text="Buscar"
android:textColor="@color/cinza" />
<Button
android:id="@+id/adicionarAmc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_weight="0.5"
android:background="@color/azulgerdau"
android:onClick="adicionarAmc"
android:text="Adicionar"
android:textColor="@color/cinza" />
</LinearLayout>
<ListView
android:id="@+id/listaAmc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/linearLayout"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"></ListView>