【问题标题】:Android ic_drawer.png icon in white color?Android ic_drawer.png 图标为白色?
【发布时间】:2014-02-20 09:48:23
【问题描述】:

我正在搜索名为 ic_drawer.png 但为白色的 android 图标。我在哪里可以找到它?

今天,在示例应用程序中,我发现这个图标只有灰色:

【问题讨论】:

    标签: android navigation-drawer


    【解决方案1】:

    Android Asset Studio 有一个非常方便的Navigation Drawer Indicator Generator,它允许您为您的图标设置自定义颜色,并生成所需的 xxhdpi、xhdpi、hdpi 和 mdpi 图像。

    为网站添加书签,它有很多对 Android 开发者非常有用的工具;)

    【讨论】:

    • 有没有办法以编程方式为这个图标着色?我想根据用户的主题偏好将其更改为白色或任何颜色。
    • @kalehv 你必须使用findViewById() 自己着色以获得android.R.id.home(或R.id.abs__home 或R.id.home,取决于兼容性) ,并在该 ImageView 上调用 setColorFilter()。 HomeView 不应用任何主题属性。如果您使用的是 ActionBarDrawerToggle 类,则可以在实例化 ABDT 类之前从主题属性中获取可绘制的 id,并将主题可绘制资源 id 传递给它。
    • archive.org 中的颜色选择器对我不起作用。我用这个代替romannurik.github.io/AndroidAssetStudio/icons-actionbar.html
    【解决方案2】:

    您可以从此link下载图标。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-30
      • 1970-01-01
      • 1970-01-01
      • 2015-04-07
      • 2021-11-03
      相关资源
      最近更新 更多