I have a framelayout with recyclerview and button:
<FrameLayout
android:id="@+id/foreground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/SG_White"
android:clickable="true"
android:focusable="true">
//BUTTON CODE
// RECYCLERVIEW CODE
</FrameLayout>
The button is hidden by default, but for some action (eg another button press), i want the button in framelayout to show over a specific index of the recyclerview.
say i want button to show on index 2 of recyclerview, then whatever is in index 2 of recyclerview will hide and the button will show on top of it. the end state will be:
-----
ITEM 0
-----
ITEM 1
-----
BUTTON (HIDING ITEM 2)
-----
ITEM 3
-----
currently the code always shows the button on top of the first item in recyclerview. how to get it over an arbitrary index eg 3 or 4??