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 7189583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:19:58+00:00 2026-05-28T19:19:58+00:00

In android you could set a navigation list in action bar by passing spinner

  • 0

In android you could set a navigation list in action bar by passing spinner adapter and OnNavigationListener. the issue is that the navigation list dont fill most of the action bar, how to make it expand like the gmail app :
Example of Gmail app :

enter image description here

My app:

enter image description here

And here’s the code :

//... setting the array adapter
ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
NavigationListener navigationListener = new NavigationListener();
ListAdapter listAdapter = new ListAdapter();
actionBar.setListNavigationCallbacks(listAdapter, navigationListener);
actionBar.setDisplayShowTitleEnabled(false);

Other problem i face is the size of the spinner item, they show up really small, is that because i dont pass customized textview (look at screenshot)? example of what i do :

private class ListAdapter extends BaseAdapter implements SpinnerAdapter {

    public View getView(int pos, View view, ViewGroup viewGroup) {
        TextView text = new TextView(context);
        text.setText(arrayAdapter.getItem(pos).toString());
        return text;
    }

}
  • 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-28T19:19:59+00:00Added an answer on May 28, 2026 at 7:19 pm

    You want to implement the getDropDownView method too. This lets you supply a different view for the dropdown list with the metrics and formatting you want.

    Consider inflating the framework layouts android.R.layout.simple_spinner_item and android.R.layout.simple_spinner_dropdown_item for these situations. Use findViewById(android.R.id.text1) to get the TextView you should fill out in each one.

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

Sidebar

Related Questions

In my Android application, I have a simple list view with adapter. There's a
How could I programmatically set data roaming on/off in my android application ?
I could find a set of java 2D game tutorials and android game tutorials
I have the following drawable set as a background: <?xml version=1.0 encoding=utf-8?> <layer-list xmlns:android=http://schemas.android.com/apk/res/android>
I have a multi-line TextView that has android:ellipsize=end set. I would like to know,
Can I upload content(any type png/jpg) onto android market, which I could download while
Android comes with lots of system resources ( android.R ) that can be used
How can I set a fixed width for an Android button? Everytime I try
i am quite new to android and i was wondering how i could go
When creating my SQLite database in Android I set the database locale - db.setLocale(new

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.