【问题标题】:Trying to get my custom spinner look to work试图让我的自定义微调器看起来工作
【发布时间】:2012-11-05 03:06:47
【问题描述】:

我通过更改颜色来编辑微调器图像。然后使用 draw9patch.bat 工具将其创建为适当的 9-patch 文件,然后将其重命名为 spinner_updated.9.png,然后将其放入我的“res/drawable”文件夹中。因此,我查看了这个链接,只是为了了解如何实现自定义微调器:

How to create android spinner without down triangle on the right side of the widget

我尝试使用 lencinhaus 和 Aleadam 方式,但是当我尝试在我的应用程序中实际使用它时,我不断收到错误:

Failed to convert @android:drawable/spinner_updated into a drawable
Couldn't resolve resource @android:drawable/spinner_updated

我做错了什么?一旦我有了想要用于我的微调器的图像并让它真正显示在应用程序中,我会怎么做?

【问题讨论】:

    标签: android spinner


    【解决方案1】:

    如果你使用自己的drawable,你需要使用:

    @drawable/spinner_updated
    

    @android: 指示应用查看 Android 的内置资源,而不是您自己的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-20
      • 1970-01-01
      • 2012-05-26
      • 2023-03-17
      • 1970-01-01
      相关资源
      最近更新 更多