【发布时间】:2015-02-13 09:09:18
【问题描述】:
我在我的应用程序中集成了 chromecast。当 chromecast 连接和未连接时,我想要不同的操作栏图标。我创建了一个可绘制的 mr_ic_media_route_holo_light.xml 并在未连接时为 chromecast 图标添加了以下代码。但是什么我需要在连接时添加不同的 chromecast 图标?我尝试创建 xml-'ic_media_route_connecting_holo_light.xmlandmr_ic_media_route_connecting_holo_light.xml 用于在连接 chromecast 时显示图标但它不起作用。它在连接或不连接 chromecast 时显示相同的图标。我正在使用主题Theme.AppCompat.Light。`
mr_ic_media_route_holo_light
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false" >
<item
android:drawable="@drawable/ic_cast_white_24dp"
android:duration="500"/>
<item
android:drawable="@drawable/ic_cast_white_24dp"
android:duration="500"/>
<item
android:drawable="@drawable/ic_cast_white_24dp"
android:duration="500"/>
<item
android:drawable="@drawable/ic_cast_white_24dp"
android:duration="500"/>
</animation-list>
【问题讨论】:
标签: android chromecast google-cast