Reputation: 1365
Take a look at action bar at this famous app. How can I create this thin gaps between buttons?
Upvotes: 1
Views: 409
Reputation: 10542
first of all the source code of the IOschede application is open source so you can easily take a look inside it and understand how it works.
by the way here is a description of the problem and wich solution you can take, of course it all depends on whic is you minSdk
attribute.
Android 3.0> with native ActionBar
if are talking about the native 3.0> ActionBar then take a look at this question.
you can use this attribute in your application style.
<item name="android:actionButtonStyle">@style/ActionButtonStyle</item>
and define the style here and place a custom 9patch background with a left vertical stripe
<style name="ActionButtonStyle" parent="@android:style/Widget.Holo.Light.ActionButton">
<item name="android:background">@drawable/custom_bg</item>
</style>
Android <3.0
you can either decide tu use ActionBarSherlock and solve all yours compatibility problem or take a look at the IOsched solution, if i'm not wrong they take the buttons style the same way it works for the native ActionBar with a application Theme attribute .
Upvotes: 0
Reputation: 16364
In the xml file that contains your buttons, specify android:layout_marginLeft / android:layout_marginRight (for the buttons) according to your need.
Upvotes: 0
Reputation: 4199
try in your xml the addtributes android:padding
and android:margin
when using a TableLayout
or a GridLayout
Upvotes: 1
Reputation: 6201
In Android this Dashboard User Interface . please check out the link
I think it help you.
Thanks
Upvotes: 0