Как я могу найти параметры макета виджета тоста?

StackOverflow https://stackoverflow.com/questions/3619670

Вопрос

Мне нравится макет toast Виджет очень много, это означает округлые углы, прозрачность, светло-серая граница. Есть ли способ увидеть параметры макета таких стандартных виджетов Android, как toast?

Я хотел бы сделать определить TextView с одинаковыми параметрами макета.

Это было полезно?

Решение

Макет можно найти под {sdkbasedir} / platforms / {release} /res/layout/transient_notification.xml

например, для 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>

Drawable Toast_Frame.9.png можно найти под {sdkbasedir} / platforms / {release} / res / drawable {-resolution}

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top