Sie benötigen einen Vollbild-Dialog zu schaffen, setzen Sie sie mit einem benutzerdefinierten Thema.
erstellen Sie einen Vollbilddialog und legen Sie seinen Inhalt mit Innenpolsterung. etwas wie folgt aus:
<style name="Dialog_Fullscreen">
<item name="android:windowActionBar">false</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
schließlich stellen Sie den Dialog wie folgt aus::
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#cb000000"
android:padding="20dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical"
....
....
YOUR CONTENT
....
..../>
</RelativeLayout>
Das benutzerdefinierte Thema sollte etwas wie dieses sein
final dialog = new Dialog(context, R.style.Dialog_Fullscreen);
Dont Arbeit, vielleicht Ich habe einen Fehler gemacht ... Ich habe die letzte Zeile hinzugefügt: final Dialog dialog = new Dialog (this, R.style.Dialog_Fullscreen); dialog.setContentView (R.layout.fragment_wrongpass_reg); dialog.setTitle ("Falscher Durchlauf"); dialog.show(); – baldcl
das Thema ist nur für Vollbild .. der Trick ist im Layout mit der Polsterung. Ihr Layout sieht wie mein Beispiel aus? – Idanatz