Icons in menu are smaller than they should be

Posted by martinpelant on Stack Overflow See other posts from Stack Overflow or by martinpelant
Published on 2011-01-07T16:29:06Z Indexed on 2011/01/07 17:53 UTC
Read the original article Hit count: 166

Filed under:
|
|

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.

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>

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.

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

© Stack Overflow or respective owner

Related posts about android

Related posts about menu