android - Set height of actionbar for all platforms -


i have custom action bar want set height compatible platforms.

activity's theme

<style name="matchestheme" parent="@android:style/theme.holo.light">     <item name="android:actionbarstyle">@style/mymatchesactionbar</item>     <item name="android:actionbartabstyle">@style/mymatchesactionbartabs</item>     <item name="@android:attr/actionbartabtextstyle">@style/mymatchesactionbartabstext</item>  </style>   <style name="mymatchesactionbar" parent="@android:style/widget.holo.light.actionbar">     <item name="android:background">#ffeb00</item>  </style>   <style name="mymatchesactionbartabs">     <item name="android:background">@drawable/tab_matches_design</item>     <item name="android:layout_gravity">fill_horizontal</item>     <item name="android:gravity">center</item>  </style>   <style name="mymatchesactionbartabstext" parent="@android:style/theme.holo.light">     <item name="android:layout_gravity">fill_horizontal</item>     <item name="android:gravity">center</item>     <item name="android:textcolor">#01296e</item>  </style> 

setting height in <item name="android:height">100pt</item> example change height differs when switch platform.

is there way weights or other way?

thanks in advance

set dp instead:

<item name="android:height">100dp</item> 

pt point , if set 100 pixel height action bar appear according screen resolution of device.

but setting dp density pixel translates value appropriate height different devices.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -