0

We have started integrating ActionBarSherlock into our app. Everything looks great, it's a really great lib, that gets in easily. But, there's one issue we don't know how to solve:

Some of the icons on some pages for larger screens get stretched. Has anybody had such problem?

Upd. 1.: Device that has icons stretched is running on Android 4.2.2 (it's Nexus 7 actually). All ok on a smaller screen like HTC Desire (2.3.3).

Upd. 2.: As the example of what is happening: there's an icon of a size of 48x52 pixels. It is in the "drawable" folder. It is used as the background for a Button widget. Before the update the app used this icon as is, i.e., it looked like 48x52. Now, looking at the element borders it looks as if the app is stretching the widget's width to be 52x52 or even wider, keeping the height same. layout_width, layout_height are set to "wrap_content"

khusrav
  • 5,267
  • 5
  • 27
  • 38
  • Have you tried to deliver larger icons to the hdpi folder? [reference](http://stackoverflow.com/questions/16079588/setting-drawable-folder-to-use-for-different-resolutions) – mmBs Jun 15 '13 at 13:57
  • Not for every icon. For those not having we wanted the icon to be loaded from "drawable" folder. And it worked that way until we moved to ActionBarSherlock. – khusrav Jun 15 '13 at 14:03

1 Answers1

0

Ok, using this answer I managed to fix -

  1. changed all the Buttons to ImageButtons
  2. all the android:background-s to android:src-es
  3. android:background-s set to 'transparent'

But! I don't know why it happened and why it worked! Any clues? Thank you!

Community
  • 1
  • 1
khusrav
  • 5,267
  • 5
  • 27
  • 38
  • noone knows the answer? Same problem found with ToggleButton, which we can't solve by transferring it to ImageButton – khusrav Jun 16 '13 at 20:12