Android的Toast默认颜色和alpha

Raf*_*fAl 6 android colors toast

Toast组件的默认颜色是什么 - 内部深灰色,浅灰色边框颜色和alpha值?我仔细检查了Toast.java的来源,但找不到它.

dmo*_*mon 16

所以从transient_notification布局xml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_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>
Run Code Online (Sandbox Code Playgroud)

哪个指向了res/drawable-hdpi/toast_frame.9.png.然而,该图像似乎因版本而异.你可以在你的android-sdk文件夹中找到它们/platforms/<the version you want>/data/res.