【问题标题】:No Resource Found When Import Style ?attr/spinnerDropDownItemStyle in Android在 Android 中导入样式 ?attr/spinnerDropDownItemStyle 时未找到资源
【发布时间】:2013-11-14 20:17:42
【问题描述】:

当我尝试在我的布局中为 LinearLayout 导入样式时,我总是收到来自 Eclipse 的错误警报“找不到与给定名称匹配的资源...”。我导入样式属性“?attr/spinnerDropDownItemStyle”的方式有问题吗?等待线索!

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="?attr/spinnerDropDownItemStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
</LinearLayout>

【问题讨论】:

    标签: android layout user-interface styles


    【解决方案1】:

    你想使用android的spinnerDropDownItemStyle。 用这种方式..

    style="?android:attr/spinnerDropDownItemStyle"
    

    【讨论】:

      【解决方案2】:

      我的 ?attr/ 属性没有被找到。问题是,就 attr 名称而言,黑暗/夜晚和白天/光明主题可能不匹配。这解决了我的奇怪问题。

      【讨论】:

        猜你喜欢
        • 2023-02-10
        • 1970-01-01
        • 2019-06-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-03-09
        • 2018-01-19
        相关资源
        最近更新 更多