53

I tried searching the design guidelines, but I couldn't find anything related to this. I am trying to figure out the optimal size for Action bar icons in the new L release. Here is an example of what I am trying to achieve:

screenshot

I tried the previous 48dp size, but it looks a lot bigger than the ones in that picture.

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
user3928288
  • 543
  • 1
  • 4
  • 5
  • 1
    Are you using Drawable images of all the various DPIs? The Android system should automatically select the one of optimal size based on the device's screen resolution if you have provided multiple resources for each Drawable in the appropriate resource folders – cjbrooks12 Aug 11 '14 at 04:42
  • I was creating generic icons from the assets studio. – user3928288 Aug 11 '14 at 04:44

2 Answers2

73

From Material Design Keylines Touch Target Size, size for icons is 24dp

Hadrien01
  • 124
  • 3
  • 12
ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
  • oh no. Not the action bar size, but the icons that go in that bar. Like the search icon and overflow icon. – user3928288 Aug 11 '14 at 04:43
  • Whoops. Right page, wrong topic: I've updated my answer accordingly. – ianhanniballake Aug 11 '14 at 04:46
  • 2
    @ianhanniballake do you mean png file should be 24dp size without inner paddings for icon? – AlexKorovyansky Feb 06 '15 at 11:11
  • 5
    @AlexKorovyansky - correct. 24dp optical bounds such as the `_24dp` versions found on the [material design icon repository](https://github.com/google/material-design-icons). Just keep in mind the minimum 48dp touch target size (Toolbar/AppCompat should do this automatically so no need to worry about those cases). – ianhanniballake Feb 06 '15 at 17:14
  • 2
    I just wanted to mention something is not quite right here, the 24dp icons Google provide in the repo do not match what they themselves are using in official apps -- they seem to use something with more padding – Daniel Wilson Mar 31 '15 at 10:04
  • 1
    @DanielWilson Yes, they look ridiculously oversized if you just paste them in from the repo. – Jimeux Jun 03 '15 at 07:59
  • Could you provide an example of an ImageButton in XML displaying this correct size and touch target? – Micro May 03 '16 at 15:04
  • I think it's ok that the canvas size and the content itself would be the same : 24dp. This is what the Android assets Studio produces too: https://romannurik.github.io/AndroidAssetStudio/icons-actionbar.html#source.type=clipart&source.clipart=3d_rotation&source.space.trim=0&source.space.pad=0&name=ic_action_3d_rotation&theme=light&color=rgba(33%2C%20150%2C%20243%2C%200.6) – android developer Mar 20 '18 at 20:53
4

Full icon size should be 24dp with a "live" area of 20dp. See this answer: https://stackoverflow.com/a/14908467/3979479

Community
  • 1
  • 1
mbo
  • 4,611
  • 2
  • 34
  • 54