-1

What is ActionBarSherlock size in pixels please ? Specifically the height, I need to design a background and I need this dimension in pixels.

And I have already searched and all I found was sizes in dp.

Jacem Chaieb
  • 192
  • 2
  • 10
  • Why can't you get it in runtime? – Semyon Danilov Jul 30 '13 at 09:13
  • possible duplicate of [What is the size of ActionBar in pixels?](http://stackoverflow.com/questions/7165830/what-is-the-size-of-actionbar-in-pixels). A simple [Google search would have thrown this result](https://www.google.co.in/?gws_rd=cr#safe=off&sclient=psy-ab&q=android+action+bar+height+in+pixels&oq=android+action+bar+size+pixels&gs_l=hp.3.0.0i22i30.92571.94076.1.95570.7.7.0.0.0.0.173.1001.0j7.7.0....0.0..1c.1.20.psy-ab.AJ66CGOcUMI&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.49967636%2Cd.bmk%2Cpv.xjs.s.en_US.jOYpRJj4zMA.O&fp=926a8da4084916e4&biw=1440&bih=775) – Siddharth Lele Jul 30 '13 at 09:14
  • Not a duplicate, I have already checked, I need the size in *pixels* so that I can draw a background in photoshop (photoshop doesn't support dp as far as I know) – Jacem Chaieb Jul 30 '13 at 09:16
  • you can convert dp in pixels . You have simply to multiply the height for the screen density – Blackbelt Jul 30 '13 at 09:19

2 Answers2

1

Obviously,

ActionBar actionBar = getSupportActionBar();
int height = actionBar.getHeight();
Semyon Danilov
  • 1,753
  • 1
  • 17
  • 37
0

you can convert dp into pixels and use in your project . I hope it will solve your poblem.. ;)

Sandip Lawate
  • 456
  • 3
  • 11