Android的Toast默认颜色和alpha

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

解决方法

所以从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>

哪个指向res / drawable-hdpi / toast_frame.9.png.然而,该图像似乎因版本而异.您可以在android-sdk文件夹中找到这些文件,在/ platforms /<您想要的版本> / data / res中.

相关文章

这篇“android轻量级无侵入式管理数据库自动升级组件怎么实现...
今天小编给大家分享一下Android实现自定义圆形进度条的常用方...
这篇文章主要讲解了“Android如何解决字符对齐问题”,文中的...
这篇文章主要介绍“Android岛屿数量算法怎么使用”的相关知识...
本篇内容主要讲解“Android如何开发MQTT协议的模型及通信”,...
本文小编为大家详细介绍“Android数据压缩的方法是什么”,内...