I have a layout like this:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/default_background">
<LinearLayout
android:layout_above="@+id/text_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
layout="@layout/toolbar"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id/text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="10dp"
android:layout_gravity="center"
android:background="@drawable/color_transparent"
android:layout_alignParentBottom="true"
android:textStyle="bold"
android:visibility="gone"
android:padding="15dp"
android:gravity="center"/>
Now when something happens, I want to show the hidden textview
below recyclerView
simply by setVisibility()
and then hide it again. when the textview
shows up, the LinearLayout
above has to squueze a bit to make room for it, resulting in hiding a bit of content of the recycler at the bottom of the screen. now my question is is there a way to instead of hiding the bottom part it scrolls a bit down hiding the same ammount of space at the top and showing textview
just below the previous bottom of the screen.
thanks in advance?