在我自己的布局使用listItemFirstLineStyle [英] Using listItemFirstLineStyle in my own layout

查看:103
本文介绍了在我自己的布局使用listItemFirstLineStyle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个类似于android.R.layout.simple_list_item_2一个自定义的ListView布局。然而,当我用我的XML下面我得到一个错误说的未找到符合给定名称资源的android:ATTR / listItemFirstLineStyle 的。

I'm trying to create a custom ListView layout similar to android.R.layout.simple_list_item_2. However, when I use the following in my XML I get an error saying "No resource found matching the given name ?android:attr/listItemFirstLineStyle".

<TextView
    android:id="@+id/text1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    style="?android:attr/listItemFirstLineStyle" />

有人能告诉我如何纠正这种或如何找到样式属性,这样我可以复制它们。我使用的是Android 2.2的。

Can someone tell me how to rectify this or how to find the style properties so that I could copy them. I'm using Android 2.2.

推荐答案

发现问题 - 安卓ATTR / listItemFirstLineStyle是旧版本我猜的SDK。对于2.0及以上 - 采用Android:ATTR / textAppearanceLarge不是机器人:ATTR / listItemFirstLineStyle

Found the problem - android:attr/listItemFirstLineStyle was for an old version of the SDK I guess. For 2.0 and above - use android:attr/textAppearanceLarge NOT android:attr/listItemFirstLineStyle

<一个href=\"http://www.google.com/$c$csearch/p?hl=en#uX1GffpyOZk/core/res/res/layout/simple_list_item_2.xml\" rel=\"nofollow\">http://www.google.com/$c$csearch/p?hl=en#uX1GffpyOZk/core/res/res/layout/simple_list_item_2.xml

这篇关于在我自己的布局使用listItemFirstLineStyle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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