6

In my android application, some of the action bar icons are at normal size (like the star in the screenshot) and some are too small (like the browser and the share icon in the screenshot).

Screenshot

All of the Icons are added in the exact same way:

menu.add(getString(R.string.sync)).setIcon(R.drawable.ic_action_sync)

This happens in three of my activities with different icons. The image files are in the correct directories for their density, they are all from the ActionBar Icon Pack and do all look the same size in the directory on the computer.

I use ActionBarSherlock to display the Actionbar on Gingerbread, but it looks exactly the same on ICS/JB, where ActionBarSherlock should use the native ActionBar (so I guess it's not ABSherlock's fault).

I have no idea, what the reason of this could be.

4

1 回答 1

0

看起来您的图标可绘制资源的大小不正确。要解决此问题,您需要重新创建图标。

执行此操作时,请务必检查Android Design-Iconography页面以确保您以正确的分辨率创建资源。

于 2013-02-07T19:29:57.877 回答