Android的工作室 - 绘制文件夹中缺少? [英] Android Studio - drawable folder missing?

查看:234
本文介绍了Android的工作室 - 绘制文件夹中缺少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的Andr​​oid Studio版本1.2.2,这我res文件夹的外观:

正如你可以看到有没有绘制文件夹present。
我担心的:


  1. 是绘制已去precated,而是它我必须把在文件夹的mipmap应用程序中使用的所有图像。

  2. 如果我需要创建一个视图,我需要把它放在了绘或的mipmap选择器或任何形状。

有没有人有线索呢?


解决方案

  1. 是绘制已去precated,而是它我必须把在文件夹的mipmap应用程序中使用的所有图像。

的mipmap文件夹放置你的应用程序图标仅在抽屉文件夹的情况下,你使用任何其他资产绘制应放置在相关的文件夹绘制和以前一样。

您应该通过的谷歌博客它说

这是放在mipmap-文件夹中的应用程序图标(而不是drawable-文件夹),因为他们是在从设备的电流密度不同的分辨率使用的最佳实践。

<醇开始=2>
  • 如果我需要创建或选择一个观点,我需要把它放在了绘任何形状或的mipmap

  • 如果你想使用选择器只需创建抽屉文件夹。

    I am using Android Studio version 1.2.2 and this how my res folder looks:

    As you can see there are no drawable folders present. My concern:

    1. Is the drawable has been deprecated and instead of it I have to place all the images used in the app in mipmap folders.
    2. If I need to create the selectors or any shape for a view I need to place it in the "drawable" or the "mipmap".

    Does anyone has clue about it?

    解决方案

    1. Is the drawable has been deprecated and instead of it I have to place all the images used in the app in mipmap folders.

    mipmap folders are for placing your app icons in only and in case of drawer folder, any other drawable assets you use should be placed in the relevant drawable folders as before.

    You should go through Google Blog which says

    "It’s best practice to place your app icons in mipmap- folders (not the drawable- folders) because they are used at resolutions different from the device’s current density."

    1. If I need to create the selectors or any shape for a view I need to place it in the "drawable" or the "mipmap"

    Just create drawer folder if you want to use selectors.

    这篇关于Android的工作室 - 绘制文件夹中缺少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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