Проблема в следующем: Есть первый layout1 , поверх него, снизу layout2, при нажатии на кнопку меняю layout2.setVisibility(VISIBLE) тем самым проявляю layout2 только он прекрывает часть списка который в layout1 и элементы которые в самом низу попросту не видны и доступа к ним нету. Как сделать так чтобы layout1 сжимался при появлении layout2 или как впихнуть это дело в SnackBar?? Заранее благодарю
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.kombo.eplog.fragments.FragmentMusic">
<LinearLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeController"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
android:id="@+id/musiclist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
></android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/info_panel"
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@color/colorDevider"></LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="13">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2.6"
android:background="?android:colorBackground">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:background="@drawable/corners_background"
android:scaleType="center"
android:src="@drawable/note_48x48" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.85"
android:background="?android:colorBackground"
android:orientation="vertical">
<TextView
android:id="@+id/bottom_name_of_composition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="Любов і сон"
android:textColor="#000000"
android:textSize="21sp" />
<TextView
android:id="@+id/bottom_name_of_artist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:text="Авет Макарян"
android:textSize="15sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2.85">
<ImageButton
android:id="@+id/skip_prev"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:colorBackground"
android:src="@drawable/ic_skip_previous_40dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2.85">
<ImageButton
android:id="@+id/pl_pause"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:colorBackground"
android:src="@drawable/ic_play_arrow_40dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2.85">
<ImageButton
android:id="@+id/skip_nxt"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:colorBackground"
android:src="@drawable/ic_skip_next_40dp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>