activatedBackgroundIndicator的布局Android蜂窝 [英] activatedBackgroundIndicator on layout Android honeycomb

查看:461
本文介绍了activatedBackgroundIndicator的布局Android蜂窝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到新的蜂窝有一个画廊样本。
它展示了如何通过添加更改所选文本视图的颜色

I see that the new honeycomb has a gallery sample. and it shows you how to change the color of the selected text view by adding

android:background="?android:attr/activatedBackgroundIndicator"

你的TextView

to your textview

不过我的列表行不仅是文本视图,但视图下的集合
线性布局。

However my row for the list is not only a text view but a collection of views under a linear layout .

要获得相同的行为蜂窝画廊列表选择我累了设置这个线性布局的背景,但它不工作。选定的行将不会改变颜色为蓝色。

To get the same behavior as the honeycomb gallery list selection i tired to set the background of this linear layout but it does not work. The selected row wont change color to blue.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:background=" android:attr/activatedBackgroundIndicator">
<BUNCH OF OTHER VIEWS/>
</LinearLayout>

在先进的感谢。

thanks in advanced.

推荐答案

您在前面忘了 的android:背景属性值。

You forgot the ? in the front of the android:background attribute value.

另外请注意, activatedBackgroundIndicator 仅在Android 3.0的可用及更高版本。

Also note that activatedBackgroundIndicator is only available in Android 3.0 and higher.

这篇关于activatedBackgroundIndicator的布局Android蜂窝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆