微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Android 选择器和文本颜色

如何解决Android 选择器和文本颜色

选择器也是这里的答案。

在源代码搜索 bright_text_dark_focused.xml,添加到 res/color 目录下的项目中,然后从 TextView 引用为

android:textColor="@color/bright_text_dark_focused"

解决方法

我想要一个简单的TextView行为方式。这是 XML:simple_list_item_1``ListView

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content" android:layout_width="fill_parent"
    android:gravity="center" android:focusable="true"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:background="@android:drawable/list_selector_background" />

除了(预期)在聚焦状态下不会改变的文本颜色之外,一切都有效。我如何使它更改为textAppearanceLargeInverse

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。