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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:19:51+00:00 2026-06-09T15:19:51+00:00

Trying to make a spinner that pops up a new little screen the user

  • 0

Trying to make a spinner that pops up a new little screen the user can select their choice from, not just a drop down menu. I’ve been searching, all the “basic” spinner examples seem to accomplish the pop up spinner, but for the life of me I can’t get it to do it on my machine.

What I have: http://developer.android.com/guide/topics/ui/controls/spinner.html

What I want: http://www.mkyong.com/android/android-spinner-drop-down-list-example/

I’d post the actual pics, but I don’t have the reputation points to do so…

//@SuppressLint("ParserError")
public class Timer_appActivity extends Activity implements OnClickListener {
private static final String TAG = "TimerActivity";
//find view and assign to Java variable
EditText Hr;
EditText Min;
EditText Sec;
Button buttonGo;
Button buttonReset;
Spinner mySpinner;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main2);

    //find views
    mySpinner = (Spinner) findViewById(R.id.playlistSpinner);

    //get the names of the playlists on device
    List<String> list = new ArrayList<String>();
    String[] proj = {MediaStore.Audio.Playlists.NAME};
    Cursor myCursor = getContentResolver().query(Uri.parse("content://com.google.android.music.MusicContent/playlists"), proj, null, null, null);
    if (myCursor.getCount() > 0) {
        myCursor.moveToFirst();
        do {
            list.add(myCursor.getString(0));
        } while (myCursor.moveToNext());
    }
    myCursor.close();
    //define spinner adapter with nice spacing and playlist names
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.row, R.id.playlistNames, list);
    //populate adapter with playlist names
    mySpinner.setAdapter(adapter);

    //add listener to buttons
    //buttonGo.setOnClickListener(this);
    //buttonReset.setOnClickListener(this);

}
}

and row.xml looks like:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id = "@+id/linearlayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="@+id/playlistNames"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize = "25dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:paddingRight="5dp"
android:paddingBottom="5dp"
/>
</LinearLayout>

and the xml for main2 looks like: (the bit for the spinner is the last entry)

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tablelayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<TableRow
    android:layout_marginLeft="20dp"
    android:layout_marginRight="15dp"
    android:layout_marginTop="30dp" 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <TextView 
        android:id = "@+id/HoursLabel"
        android:text = "@string/stringHours"
        android:layout_column = "1"
        android:textSize="30dp"
        android:gravity = "center"
    />
    <TextView 
        android:id = "@+id/MinLabel"
        android:text = "@string/stringMin"
        android:layout_column = "3"
        android:textSize="30dp"
        android:gravity = "center"
    />
    <TextView 
        android:id = "@+id/SecLabel"
        android:text = "@string/stringSec"
        android:layout_column = "5"
        android:textSize="30dp"
        android:gravity = "center"
    />
    <TextView 
        android:layout_width="15dp"
    />
</TableRow>

<TableRow
    android:layout_marginLeft="20dp"
    android:layout_marginRight="15dp" 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    <EditText 
        android:id ="@+id/HoursNum"
        android:hint = "@string/NoNumHrs"
        android:gravity = "center_horizontal"
        android:textSize="50dp"
        android:inputType="numberDecimal"
        android:layout_column = "1"
    />
    <TextView 
        android:id = "@+id/colon1"
        android:text = "@string/colon"
        android:textSize = "50dp"
    />
    <EditText 
        android:id ="@+id/MinNum"
        android:hint = "@string/NoNumMin"
        android:textSize="50dp"
        android:inputType="numberDecimal"
        android:gravity = "center_horizontal"
    />
    <TextView 
        android:id = "@+id/colon2"
        android:text = "@string/colon"
        android:textSize = "50dp"
    />
    <EditText 
        android:id ="@+id/SecNum"
        android:hint = "@string/NoNumSec"
        android:textSize="50dp"
        android:inputType="numberDecimal"
        android:gravity = "center_horizontal"
    />
</TableRow>
<TableRow
    android:layout_marginLeft="20dp"
    android:layout_marginRight="15dp" 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    <Spinner
    android:id="@+id/playlistSpinner"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:prompt="@string/selectplaylist"
    android:layout_marginTop="25dp"
    android:layout_column = "3"/>   
</TableRow>

  • 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-09T15:19:52+00:00Added an answer on June 9, 2026 at 3:19 pm

    Got it. Super simple.

    Add the following to the attributes list of the spinner in the xml file.

    android:spinnerMode=”dialog”

    other option is

    android:spinnerMode=”dropdown”

    This works for level 11 and above, I believe…(maybe lower?)

    So easy…urg

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

Sidebar

Related Questions

I'm trying to make a spinner with an array that I retrieve from a
I am trying to make a spinner list where my users can select a
I'm trying make a login window where a user is prompted to enter their
Trying to make a regex that can handle input like either: Beverly Hills, CA
i'm new in android programming, i'm trying make dynamic depended spinner by pass a
I'm trying make an entity with doctrine that has three associations with other entities
I am trying make long screen to vertical direction. So, I need a screen
I am fairly new to iOS development and trying make a simple app which
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to make the infamous checkall checkbox for dynamically created rows from a MySQL

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.