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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:56:35+00:00 2026-06-11T22:56:35+00:00

What i want to achieve is populating a spinner with previously created openFileOutput files.

  • 0

What i want to achieve is populating a spinner with previously created openFileOutput files.

This is the code for creating the files:

save.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                FILENAME = filename.getText().toString();
                COMMENTS = comments.getText().toString();
                try {
                    FileOutputStream f = openFileOutput(FILENAME,
                            Context.MODE_PRIVATE);
                    f.write(COMMENTS.getBytes());
                    f.close();
                    Toast.makeText(getBaseContext(),
                            "Saved",
                            Toast.LENGTH_SHORT).show();
                } catch (FileNotFoundException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }

            }

        });

So for example: I create these 3 files with the code above:
File1
File2
File3

I want my spinner to look like this:

File1

File2

File3

The problem i’m having is that i have no clue to how this is done.

I google searched it, but unfortunately no results.

Can someone explain to me how to achieve this, preferably with sample code?

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-06-11T22:56:36+00:00Added an answer on June 11, 2026 at 10:56 pm

    I got it working.

    It’s really simple just use fileList ().

    Populate an array with fileList (). And use that array as third argument of the arrayadapter.

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

Sidebar

Related Questions

I want to achieve something like this inside a UIView: I have created a
I want to achieve the effect that is used on this Header on this
I want to achieve this effect: When the user focus a text area within
I want to achieve a list like this with smarty. <ul> <li> <a>img1</a> <a>img2</a>
I want to achieve hide/show with div's in html but in this way. Here
I want to achieve something like the following: UrlBuilder ub = new UrlBuilder(http://www.google.com/search); ub.Parameters.Add(q,request);
I want to achieve something like this in C# 3.5: public void Register<T>() :
What I want to achieve is populating many form fields with the same value.
I want to achieve XML in this style using C# XMLseralizer <state id=s1>val<state />
I want to achieve the similar result for my own code:

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.