需要说明的是:
我曾考虑将这个问题发布在graphicdesign.stackexchange.com上,但我得出结论,我的Android特定问题可能不是最适合的地方。这就是为什么我选择了stackoverflow,因为它似乎更多是关于Android imageView的问题,而不是图形本身的问题。谢谢。
我需要在我的Android应用中使用一些基本图标。我有Illustrator和Photoshop(都不是很擅长,但我可以勉强做到)。我偶然发现了http://www.androidicons.com/,看到只需25美元就可以节省数小时的时间,所以觉得很划算。为了了解如何在我的应用中使用它们,我下载了免费的“BONUS ICONS 01”包。
我决定尝试使用钟表图标,并查看它在我的应用中如何工作。我在Illustrator中将图标放大到约800px,然后复制并粘贴到Photoshop中。我将其保存为.png格式,然后创建了一个样例应用程序来测试它。
该图像仅放置在xhdpi文件夹中,因为我可能会将此图标用于比操作栏更大的内容,但不会占据整个屏幕。我脑海中的想法是,如果您要为所有不同dpi级别创建操作栏图标,则必须确切地知道要制作它们的大小(以像素为单位),因此它们都看起来非常好(例如,如果从Google下载操作栏图标,则它们会提供几种大小,而不仅仅是一种)。但是,如果它们将用于比这更大的东西呢?我该怎么知道要制作什么样的大小。
为了真正显示我对自己无法理解这个主题的沮丧,这是我的应用程序代码和在我的Galaxy Nexus上的最终结果。较大的图标很好,而较小的图标明显不太清晰。我该如何解决这个问题?在Illustrator中制作图像、进入Photoshop并确保它们在任何尺寸下都能很好地展示的正确方法是什么?
真诚地,
一位Android开发者,他不懂图形。
正如您所见,当图像很大时,它似乎看起来相当不错,但在较小的尺寸下使用它会导致一些问题。有任何办法解决吗?我是不是太挑剔了?即使我调整大小并将其放入mdpi中,我的布局是否也能支持呢?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|center_horizontal" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/anti_huge"
android:layout_weight="1" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/anti_huge"
android:layout_weight="1" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/anti_huge"
android:layout_weight="1" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/anti_huge"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:gravity="center|center_horizontal" >
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/anti_huge" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
问题总结:
- 但如果它们将被用于比ActionBarIcons更大的事情怎么办?("that" = ActionBarIcons)
- 我应该如何知道要制作什么尺寸?(Google提供的ActionBarIcons具有设置的像素尺寸,他们是如何算出这些尺寸的)
- 我该怎么解决这个问题?(测试应用程序上的大图标看起来很好,而较小的图标看起来锯齿状)
- 在Illustrator中制作图像的正确方法是什么,然后进入Photoshop并确保它们在任何尺寸下都看起来很棒?
- 有什么方法可以修复它吗?
- 我太挑剔了吗?(请告诉我是的...这件事正在折磨我。)
- 即使我将其调整为更小的大小,并将其放入mdpi中,我的布局会选择它吗?