Frage

Ich mag das Layout der toast Widget sehr, dass Mittel abgerundeten Ecken, Transparenz, hellgrau Grenze. Gibt es eine Möglichkeit die Layout-Parameter wie zum Android Standard-Widgets wie die toast zu sehen?

Ich möchte eine TextView mit den gleichen Layout-Parameter definieren.

War es hilfreich?

Lösung

Das Layout finden Sie unter {SDKBASEDIR} / Plattformen / {} RELEASE /res/layout/transient_notification.xml

z. für 2.1:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:background="@drawable/toast_frame">
<TextView
    android:id="@android:id/message"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:textAppearance="@style/TextAppearance.Small"
    android:textColor="@color/bright_foreground_dark"
    android:shadowColor="#BB000000"
    android:shadowRadius="2.75"
    />

</LinearLayout>

Die ziehbar toast_frame.9.png kann unter {SDKBASEDIR} gefunden werden / Plattformen / {RELEASE} / res / ziehbar {-Auflösung}

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top