能自动Eclipse进行Android的项目产生不同的DPI图像? [英] Can Eclipse automatically generate different DPI images for Android projects?

查看:459
本文介绍了能自动Eclipse进行Android的项目产生不同的DPI图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图导入为600x600 PNG我做了我的Andr​​oid项目,这样我可以把它作为一项活动一个全尺寸的图像。拖放到我的/ res文件夹只是把它的文件夹,这当然是生成一个无效的资源目录名的错误研究。 我可以把它放到任何一个/ RES /可绘制文件夹和工作正常,但那么它只有在一个文件夹中。 当然,还有一个内置的工具,它可以把我的形象和它相应地放大每个/ RES /可绘制文件夹。

I'm trying to import a 600x600 PNG I made into my Android project so that I can use it as a full-sized image in an Activity. Dragging and dropping it onto my /res folder just puts it in that folder, which of course generates an "invalid resource directory name" error. I can drop it into any of the /res/drawable folders and that works fine, except then it's only in that one folder. Surely, there's an inbuilt tool which can take my image and scale it appropriately for each /res/drawable folder.

推荐答案

AFAIK没有。

您可以做什么虽然是只使用了绘制-xhdpi 文件夹。 Android将自动缩减为较低的DPI。

What you can do though, is use the drawable-xhdpi folder only. Android will automatically scale down for lower dpi.

唯一的例外是启动器图标。你将不得不为各种规模(不要忘记xxhdpi的平板电脑!)。

The only exception is the launcher icon. You will have to provide all sizes (don't forget xxhdpi for tablets!).

您可以找到图标设计准则所需要的尺寸。

You can find the needed sizes in the Icon Design Guidelines.

要注意的是ADT插件确实有工具用于产生一些图标集,如启动程序的图标,动作条图标和通知图标是很重要的。

It is important to note that the ADT plugin does have tools for generating some icons sets, such as Launcher icons, Actionbar icons and Notification icons.

这些工具可以通过打开的的向导(Ctrl + N),并双击访问的的Andr​​oid图标集的的的的Andr​​oid 的类别中

These tools can be accessed by opening the New wizard (Ctrl + N) and double-clicking Android Icon Set in the Android category.

这篇关于能自动Eclipse进行Android的项目产生不同的DPI图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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