5

ウィジェットのレイアウトがtoastとても気に入っています。つまり、角が丸く、透明度が高く、境界線が薄い灰色です。のようなAndroid標準ウィジェットのレイアウトパラメータを確認する方法はありますtoastか?

TextView同じレイアウトパラメータでを定義したいと思います。

4

1 に答える 1

10

レイアウトは {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>

ドローアブル toast_frame.9.png は、{SDKBASEDIR}/platforms/{RELEASE}/res/drawable{-RESOLUTION} にあります。

于 2010-09-01T15:57:33.643 に答える