开发者

how can I find the layout parameters of the toast widget?

开发者 https://www.devze.com 2023-01-14 05:16 出处:网络
I like the layout of the toast widget very much, that means rounded corners, transparency, light grey border. Is there any way to see the layout parameters of such android standard widgets like the to

I like the layout of the toast widget very much, that means rounded corners, transparency, light grey border. Is there any way to see the layout parameters of such android standard widgets like the toast?

I would like do define a开发者_如何学Go TextView with the same layout parameters.


The layout can be found under {SDKBASEDIR}/platforms/{RELEASE}/res/layout/transient_notification.xml

e.g. for 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>

The drawable toast_frame.9.png can be found under {SDKBASEDIR}/platforms/{RELEASE}/res/drawable{-RESOLUTION}

0

精彩评论

暂无评论...
验证码 换一张
取 消