Ich benutze die Bibliothek https://github.com/futuresimple/android-floating-action-button, um die Fab-Tasten zu erstellen, die ziemlich gut funktioniert. Ich habe mehrere Bibliotheken ausprobiert, aber keiner verwendet den Effekt, der in den meisten Anwendungen mit einer Fab (oder Google-Apps wie halten, Posteingang) verwendet wird, wenn der Hintergrund der gesamten Anwendung halbtransparent weiß oder schwarz wird, hängt es ab. Ich kann keinen Weg finden, es zu tun. Ist es möglich, ein Beispiel oder etwas Ähnliches zu haben, um diese Art von Effekt zu erzielen? Sie können sehen, was ich in diesem Bild bedeuten: Alpha-Hintergrund auf FAB geklickt
Der halb schwarzer Hintergrund
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/semi_white_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white_semi_transparent"
android:visibility="gone" >
</RelativeLayout>
<RelativeLayout
android:id="@+id/listFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/content_frame"
android:visibility="gone" >
<TextView
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cabinet_color"
android:fontFamily="sans-serif"
android:gravity="center_vertical"
android:paddingBottom="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="8dp"
android:textColor="#fff"
android:textSize="17sp"
android:visibility="gone" />
<android.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/status"
android:clipToPadding="false"
android:scrollbars="vertical" />
<LinearLayout
android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical" >
<ImageView
android:id="@+id/emptyImage"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:scaleType="fitXY"
android:src="?empty_image" />
<TextView
android:id="@+id/emptyText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:lineSpacingMultiplier="1.4"
android:paddingBottom="16dp"
android:text="@string/no_files"
android:textColor="?empty_text"
android:textSize="22sp" />
</LinearLayout>
</RelativeLayout>
<ProgressBar
android:id="@android:id/progress"
style="?android:progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminateOnly="true" />
</RelativeLayout>
dies mein layout.xml ist aber die Arbeit scheint überhaupt nicht, wie ich want.Seems, dass nicht die gesamte überlappt Aussicht, aber nur Farben, was es will ..
Sie nicht bekommen, beschreiben Sie einfach Problem in einfacher Form. – Harry