Android-Dialog aufrufen, ohne dass der Hintergrund ausgeblendet wird

Habe ich diese schöne dialog-Ansicht habe ich meine UserInputDialog Klasse:

    <LinearLayout android:id="@+id/LinearLayout01" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android">

        <TextView
        android:id="@+id/nameMessage"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="What is your name Captain?"
        >
        </TextView>
        <EditText
        android:id="@+id/nameEditText"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textSize="18sp"
        >
        </EditText>
    <LinearLayout android:id="@+id/LinearLayout02" android:layout_width="fill_parent" android:layout_height="wrap_content" 
        android:layout_gravity="center_horizontal">
    <Button
        android:id="@+id/okButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="OK">
        </Button>
        <Button android:id="@+id/cancelButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Cancel">
        </Button>               
    </LinearLayout>
</LinearLayout>

Möchte ich meinen dialog zu zeigen, aber für den hintergrund nicht ausblenden. Ist das möglich? Ursache ist der Ansicht, dass Anrufe dieser dialog hat einen neato hintergrund möchte ich als hintergrund für den dialog.

Fand ich diese online:

<style name="doNotDim" parent="@android:style/Theme.Dialog">
    <item name="android:backgroundDimAmount">0</item>
</style >

aber nicht sicher, wie Sie Sie anwenden, um meinen dialog? Ich habe eine Klasse namens public class UserInputDialog extends Dialog implements OnClickListener. Er stellt seine Inhalte-Ansicht zu dem layout oben beschrieben.

Ich denke, ich bin dies alles Recht, nur nicht sicher, wie Sie Sie hinzufügen, dass Stil, so kann ich NICHT blenden Sie die hintergrund.

Sekundäre Frage: Kann man neue Blicke auf den dialog (mit der Aussage, ein Bild oder Symbol-Anzeige mit Ihren text dort) durch Verwendung von Designs?

InformationsquelleAutor der Frage Codejoy | 2010-06-24

Schreibe einen Kommentar