Ich habe eine Sicht mit einigen Fragmenten und ich habe eine Snackbar mit einer Folie Animation erstellt. Die Animation funktioniert gut, aber bevor sie auftaucht, erscheint ein weißes Fenster, wo die Snackbar erscheinen wird.setTranslationY ein weißes Fenster erscheint auf meinem Fragment Container
Es passiert, weil ich SetTranslationY auf der Ansicht verwenden. Ich habe versucht, den Hintergrund transparent zu machen, aber es hat nicht funktioniert.
Wie kann ich es lösen?
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent">
<LinearLayout
android:id="@+id/pager_activity_page"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:color/transparent">
<FrameLayout
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@android:color/transparent"
android:layout_weight="1"
/>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@android:color/black"
android:id="@+id/snackbar_container"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@android:color/white"
android:textSize="13sp"
android:textStyle="normal"
android:id="@+id/snackbar_text"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center" />
</FrameLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
style="@style/MyCustomTabLayout"
app:tabGravity="fill"
app:tabMode="fixed"
android:background="@android:color/white"
app:tabIndicatorColor="@android:color/white"
app:tabSelectedTextColor="@color/bpBlue"
app:tabTextColor="#929292"
/>
</LinearLayout>
</RelativeLayout>
Könnten Sie bitte Xml hinzufügen – user3621165
Ja sicher! Gerade hinzugefügt –