在菜单中的图标均小于他们应该是 [英] Icons in menu are smaller than they should be

查看:93
本文介绍了在菜单中的图标均小于他们应该是的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决的: 我用的是从SDK V9图标(的Andr​​oid 2.3姜饼),这似乎有不同的维度。资产工作室也为2.3创建的图标。所以,我把姜饼图标绘制-xxpi-V9和旧版本,我把图标从SDK V8到可绘制,华电国际,它现在正常工作

SOLVED: I was using icons from sdk v9 (Android 2.3 Gingerbread) which seems to have different dimension. The asset studio also creates icons for 2.3. So I placed gingerbread icons to drawable-xxpi-v9 and for older versions I put icons from SDK v8 to drawable-hdpi and it works fine now

原题: 你好,我有一个小问题。 在我的apk文件的图标比其他的应用程序相同的图标(的Gmail等)小 这就是它看起来像在我的APK ,这是在相同的图标 Gmail.apk 。 我已经直接从SDK复制这些图标,为华电国际,MDPI和LDPI特定的文件夹。

Original question: Hello I have a little problem. All the icons in my apk are smaller than the same icons in other apps (Gmail etc.) This is how it looks like in my apk and this is the same icon in Gmail.apk. I have copied these icons directly from SDK to the specific folders for hdpi, mdpi and ldpi.

下面是一个华电国际图标我用一个例子我menu.xml文件

Here is an example of a hdpi icon I use and my menu.xml

   <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
 <item
  android:id="@+id/refresh"
  android:title="@string/refresh"
  android:icon="@drawable/ic_menu_refresh" />
 <item
  android:id="@+id/add"
  android:title="@string/add"
  android:icon="@drawable/ic_menu_add" />
 <item
  android:id="@+id/login"
  android:title="@string/account"
  android:icon="@drawable/ic_menu_login" />
</menu>

有谁知道如何让这些图标具有相同的大小,在其他的apk? 我曾尝试资产工作室没有影响。

Does anybody know how to make these icon have the same size as in other apk's? I have tried the asset studio with no effect.

更新::如果我直接引用的图标从安卓(Android版本:绘制),那么它的正常大小。然而,并非所有的图标可以被引用。

UPDATE: If I reference an icon directly from android (android:drawable) then it has normal size. However not all icons can be referenced.

推荐答案

我用的是从SDK V9图标(的Andr​​oid 2.3姜饼),这似乎有不同的尺寸。资产工作室也为2.3创建的图标。 所以,我把姜饼图标绘制-xxpi-V9 和老版本的,我把从SDK V8图标绘制 - 华电国际现在它工作得很好。

I was using icons from sdk v9 (Android 2.3 Gingerbread) which seems to have different size. The asset studio also creates icons for 2.3. So I placed gingerbread icons to drawable-xxpi-v9 and for older versions I put icons from SDK v8 to drawable-hdpi and it works fine now.

这篇关于在菜单中的图标均小于他们应该是的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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