Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6856293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:52:01+00:00 2026-05-27T01:52:01+00:00

Here is the dev guide related to the subject http://developer.android.com/guide/topics/ui/actionbar.html#ActionItems So we have in

  • 0

Here is the dev guide related to the subject http://developer.android.com/guide/topics/ui/actionbar.html#ActionItems

So we have in activity

public class MyActivity extends Activity {

@Override
public boolean onCreateOptionsMenu(Menu menu)
{
    super.onCreateOptionsMenu(menu);
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.my_menu, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item)
{
    switch (item.getItemId())
    {
    case R.id.first_menu_button:
        return true;
    case R.id.second_menu_button:
        return true;

    default:
        return super.onOptionsItemSelected(item);
    }
}

Where R.menu.my_menu is

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/first_menu_button"
        android:showAsAction="always"
        android:icon="@drawable/btn_first"/>
    <item
        android:id="@+id/second_menu_button"
        android:showAsAction="always"
        android:icon="@drawable/btn_second"/>
</menu>

To style that buttons http://developer.android.com/guide/topics/ui/actionbar.html#ActionItemStyles say we should use android:actionButtonStyle attribute. I’ve done it like this:

In manifest:

<activity android:name="com.root.test.MyActivity"
    android:theme="@style/CustomActionBarStyle"
</activity>

In styles.xml:

<style name="CustomActionBarStyle" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionButtonStyle">@style/customActionButtonStyle</item>
    <item name="android:windowActionBar">true</item>
    <item name="android:windowNoTitle">false</item>   
</style>

<style name="customActionButtonStyle" parent="@android:style/Widget.Holo.Light.ActionButton">
    <item name="android:[...]
</style>

Problem is that whatever I write in customActionButtonStyle, it’s just ignoring it. Other atributes in CustomActionBarStyle works (even more complicated, they are jast omit for the sake of simplicity). My main purpuse was to set custom padding. Is there any other way to do that, like some other, not android:actionButtonStyle attribute? Or some one knows how to get this work? (android:abItemPadding attribute added only in 3.1)

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:52:02+00:00Added an answer on May 27, 2026 at 1:52 am

    Most style elements will work but padding is supplied by the system layouts used to generate the action buttons and likely will not do what you expect. Most action bar metrics such as padding and margins should generally be left alone for UX consistency. Even the item padding attribute you noted is meant to be informational for apps that may want to use it to style their own custom action views.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to use alter table but the syntax posted here: http://dev.mysql.com/doc/refman/5.1/en/alter-table.html is very
Going off the documentation here: http://docs.djangoproject.com/en/dev/topics/db/sql/ >>>cursor = connection.cursor() >>>cursor.execute(UPDATE bar SET foo =
I've taken the MVC introduction ( http://dev.sencha.com/deploy/ext-4.0.7-gpl/docs/index.html#!/guide/application_architecture ) and tried to modify it to
I was reading this section in the Android Dev Guide : here and I
Here's a quote from Android's Dev Guide: A central feature of Android is that
The sidebar navigation here: http://dev.southernlivingplants.com/in_the_garden needs some TLC. There are a couple of issues
I'm calling the Bing Maps Service to return some XML here: http://dev.virtualearth.net/REST/v1/Locations/Encoded_Address?o=xml&key=Maps_Key For the
Probably something simple, but I'm pulling my hair out: Site in question here: dev.sauceboxcreative.com/karenpool/
I've been searching around the internet, the android dev guide and stackoverflow for almost
I have this website: http://dev.gratefulhearttherapy.org/ with a dropdown menu, it's supposed to unfold when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.