【发布时间】:2012-12-24 04:35:18
【问题描述】:
作为序言:
我曾考虑将其放在 graphicsdesgin.stackexchange.com 上,但我得出的结论是,我的 android 特定问题可能不是最适合它的地方。这就是我选择stackoverflow的原因,因为它似乎更多的是Android imageViews而不是图形本身的问题。谢谢。
我需要在我的 Android 应用程序中使用一些基本图标。我有 Illustrator 和 Photoshop(其中任何一个都不擅长,但我能过得去)。我偶然发现了http://www.androidicons.com/,我看到了一个很好的机会,只需 25 美元就可以节省我几个小时的时间。为了了解如何在我的应用程序中使用它们,我下载了免费的“BONUS ICONS 01”包。
我决定尝试使用时钟图标,看看它在我的应用程序中是如何工作的。我在 Illustrator 中将图标放大到大约 800 像素,然后将其复制并粘贴到 Photoshop 中。我将它保存为 .png,然后我创建了一个示例应用程序来测试它。
图像只放入 xhdpi 文件夹,因为我可能会将此图标用于比操作栏更大的东西,但不会占用整个屏幕。我的想法是,如果您要为所有单独的 dpi 级别创建操作栏图标,那么您必须确切知道要制作它们的大小(以像素为单位),因此它们看起来都非常好(例如,如果您从 google 下载操作栏图标,它们会以几种尺寸提供给您,而不仅仅是一种)。 但是,如果它们要用于更大的用途怎么办?我怎么知道要制作什么尺寸。
真正表达我对我无法理解这个主题的挫败感。这是我的应用程序的代码,以及它最终在我的 Galaxy Nexus 上的样子。较大的图标很好,而较小的图标肯定看起来不那么清晰。 我该如何解决这个问题?在 Illustrator 中制作图像并转到 Photoshop 并确保它们在使用的任何尺寸下看起来都很棒的正确方法是什么?
此致,
只是不懂图形的 Android 开发者。
如您所见,图像在较大时看起来不错,但在较小时使用它会导致 IMO 出现一些问题。有什么办法可以解决吗?是我太挑剔了吗?即使我将它的大小调整为更小,并将其放入 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)
- 我怎么知道什么尺寸 制作它们? (ActionBarIcons 是 Google 给我的,带有 set 像素尺寸,他们是如何计算出这些尺寸的)
- 我该如何解决这个问题? (测试应用程序上的大图标看起来不错,而 较小的看起来参差不齐)
- 什么是制作图像的正确方法 Illustrator 和 Photoshop 并确保它们看起来很棒 它们有什么尺寸?
- 有什么办法可以解决这个问题?
- 我也是 挑剔? (请告诉我,我是……这种磨难正在杀死我。)
- 即使我将其重新调整为更小,并将其放入 mdpi,我的布局也会 甚至把它捡起来?
【问题讨论】:
-
这里的问题太多了!每个帖子一个问题....
标签: android xml android-actionbar android-imageview vector-graphics