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

  • SEARCH
  • Home
  • 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 8055587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:26:11+00:00 2026-06-05T08:26:11+00:00

I am working on an Android Honeycomb with an ActionBar. I have set up

  • 0

I am working on an Android Honeycomb with an ActionBar. I have set up the ActionBar the following way:

// Configures the action bar
private void configureActionBar() {
    mActionBar = getActionBar();
    mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);

    SpinnerAdapter spinnerAdapter = ArrayAdapter.createFromResource(this, R.array.rooms, android.R.layout.simple_spinner_dropdown_item);

    ActionBar.OnNavigationListener navigationCallback = new ActionBar.OnNavigationListener() {
        public boolean onNavigationItemSelected(int itemPosition, long itemId) {
            String[] rooms = getResources().getStringArray(R.array.rooms);

            mAppState.setCurrentRoom(rooms[itemPosition]);

            return false;
        }
    };

    mActionBar.setListNavigationCallbacks(spinnerAdapter, navigationCallback);
}

The image below displays a screenshot of a portion of the ActionBar. I would like to style the dropdown list, but am not sure how to do it. This link has some XML samples, but I do not know how to apply them and how to style the specific elements that are pointed out below.

ActionBar Dropdown List for Styling

Here’s a list of changes that I would like to make:

  1. Change the font size of the selected item to match that of the words “Room Manager”
  2. Remove the gray line underlying the displayed selected item
  3. Remove the blue line at the top of the dropdown list
  4. Add radio buttons to the list items and check the currently selected item in the dropdown list
  5. Change the color of the lines separating the list items

Does anyone have any ideas on how to do this?

Thank you!

  • 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-06-05T08:26:12+00:00Added an answer on June 5, 2026 at 8:26 am

    I found out how to style the items in the list, as well as the displayed item. The solution involved creating two layout xml files in the /res/layout directory – one for the spinner dropdown items, and one for the selector (the displayed item). I was then able to add the view resources to the ArrayAdapter.

    R.layout.spinner_dropdown_text_view:

    <?xml version="1.0" encoding="utf-8"?>
    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/spinnerDropdownTextView"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:paddingLeft="10dp"
        android:gravity="center_vertical"
        android:textSize="18dp" />
    

    R.layout.spinner_selector_text_view:

    <?xml version="1.0" encoding="utf-8"?>
    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/spinnerSelectorTextView"
        android:layout_width="210dp"
        android:layout_height="match_parent"
        android:paddingTop="12dp"
        android:textSize="18dp"
        android:textColor="@android:color/black" />
    

    The ArrayAdapter code:

    ArrayAdapter<CharSequence> aa = ArrayAdapter.createFromResource(this, R.array.rooms, R.layout.spinner_selector_text_view);
    aa.setDropDownViewResource(R.layout.spinner_dropdown_text_view);
    

    The result:

    The result

    Unfortunately, I was not able to figure out how to add the radio buttons, or how to remove any of the horizontal lines.

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

Sidebar

Related Questions

I am working on Android SDK-NDK and have a problem with the following piece
I'm attempting to style the ActionBar, following this blog post: http://android-developers.blogspot.com/2011/04/customizing-action-bar.html With this source
I'm working with Android and I really need a fast way to get a
I just started working with Android and I have a problem with my map.
Background: I am working on an Android Honeycomb (v3.0) application that has a requirement
I'm working on Android, but this is a java question. I have an image
I am working on an Android Honeycomb (v3.0) application that has a requirement of
Hi I am working Android application development using titanium studio.I have developed small application.my
I am currently working on Android I have a xml which is like this:
I'm working on a Honeycomb app that needs a SearchView in the Actionbar, but

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.