<LinearLayout
android:id="@+id/toplayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/filterlayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/menulayout"
android:layout_width="65dp"
android:layout_height="50dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="15dp"
android:background="@drawable/formenulayout"
android:elevation="10dp"
android:orientation="vertical"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
>
<ImageButton
android:id="@+id/menu"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_gravity="center"
android:backgroundTint="@color/white"
app:srcCompat="@drawable/menu_button" />
<ImageButton
android:id="@+id/settings"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:background="@drawable/gear"
android:visibility="gone"
app:useMaterialThemeColors="false" />
</LinearLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/materialCardView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:cardCornerRadius="12dp"
app:cardElevation="8dp"
app:cardUseCompatPadding="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/menulayout"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.SearchView
android:id="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:iconifiedByDefault="false"
app:layout_constraintStart_toStartOf="@id/menulayout"
app:queryBackground="@android:color/transparent"
app:queryHint="Search here" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
Hello, this is my code for my mainacitivty. when i press menu imageButton the menulayout increases in height and it works perfectly except the problem is that becuase menulayout increases in height it causes the toplayout to increase in height as well that i dont want it to do.
how can i make it so when the height is increased for menulayout it will be in front of everything and the top layout stays the same.