Android Button overlapping other fragments during vertical scroll -
i'm using gesture detector determine when user swipes downwards in turn replaces first fragment above fragment. now, works fine, first fragment frame layout , disappears nicely. xml
<?xml version="1.0" encoding="utf-8"?> <framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/first_fragment"> <surfaceview android:id="@+id/surface_view" android:layout_width="match_parent" android:layout_height="match_parent" /> <imageview android:id="@+id/image_view" android:layout_width="match_parent" android:layout_height="match_parent" /> <view android:layout_width="match_parent" android:layout_height="wrap_content" /> <textview android:id="@+id/tvlabel2" android:layout_width="match_parent" android:layout_height="match_parent" android:textcolor="#585858" /> <textview android:id="@+id/text_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="bottom"/> <button android:id="@+id/button1" android:layout_width="75dp" android:layout_height="75dp" android:layout_gravity="bottom|center_horizontal" android:background="@drawable/main_button" android:elevation="0dp" />
the problem "button1" element won't go away after replacing fragments. second fragment's background solid white, if button isn't removed, shouldn't in forground , yet is. in own troubleshooting i've tested other elements checkbox , disappears, when try other buttons behave same way leading me believe messed property in buttons.
also i'm not sure if relevant, have animation when swiping , down, when swipe first fragment, can see copy of button behaves supposed , swipes down, first copy remains in place throughout whole animation , clickable in second fragment.
does know how can make button disappear along rest of siblings?
Comments
Post a Comment