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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:46:30+00:00 2026-06-12T17:46:30+00:00

I want built a Android App and use Eclipse for this. It is my

  • 0

I want built a Android App and use Eclipse for this. It is my first App and I have read on http://developer.android.com how I can create a App and more.

To my Appliation:

I use three Activitys.

The First Activity ist the main. On the Second Activity can I input a string and have a Button. On my third Activity I have a ListView but its empty. If I click on the second Activity of the Button I want that the string will be send to the ListView on the Third Activity.

a other Question is how I can save Informations in a Android App. Can I use a database or what is the right way. I want save the listview and if I open the Activity from the Main Activity i want see the Listview with the Informations.

MyCode:

FirstActivity:

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    public void createPlan(View view)
    {
        Intent intent = new Intent(this,CreateActivity.class);

        startActivity(intent);

    }
}

Second Activity:

public class CreateActivity extends Activity {

    public final static String ListViewMessage = "de.linde.KSDILLPlan";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_create);

        FillSpinnerViews(); 
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.test, menu);
        return true;
    }

    public void FillSpinnerViews()
    {
        Spinner spinner = (Spinner)findViewById(R.id.spinner2);

        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.daysArray, android.R.layout.simple_spinner_item);

        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

        spinner.setAdapter(adapter);


        Spinner Spinner2 = (Spinner)findViewById(R.id.spinner1);

        ArrayAdapter<CharSequence> adapter2 = ArrayAdapter.createFromResource(this, R.array.zeitArray, android.R.layout.simple_spinner_item);

        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

        Spinner2.setAdapter(adapter2); 

    }

    public void createPlan(View view)
    {
        String PlanName;
        //String StundenZahl;
        //String Wochentag;
        //Boolean doppelstunde; 

        Intent intent = new Intent(this,OpenActivity.class);

        EditText planName = (EditText)findViewById(R.id.editText1);

        PlanName = planName.getText().toString();

        intent.putExtra(ListViewMessage, PlanName); 

        startActivity(intent);

    }

Third Activity: The ListView

public class OpenActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_open);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_open2, menu);
        return true;
    }
}
  • 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-12T17:46:31+00:00Added an answer on June 12, 2026 at 5:46 pm

    You can pass the data from one activity to another using intent as follows,

    In second activity in onclick of button,

    Intent in=new Intent(currentclass.this,nextactivity.class);
    in.putExtras("value_name",value);
    startActivity(in);
    finish();
    

    In third activity,

    If(getIntent().getExtras!=null)
    {
       String msg=getIntent().getStringExtra("value_name"); // value_name is the attribute given in second activity
    }
    

    You can store the data in the database or sharedpreference. it depends upon your needs.
    If you want to store bulk data as large number of person details, you can store in database using SQLite or if you want to store small data like login details you can store in SharedPreferences.

    Refer the link for Database and SharedPreferences as

    SQLite

    SharedPreferences

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

Sidebar

Related Questions

I have built an android app which use Google Map feature. I want my
I have read this link :Open an image in Android's built-in Gallery app programmatically
I have an android app which was built on eclipse. What i am currently
I want to integrate Facebook with my Birthday App, so I started https://developers.facebook.com/docs/mobile/android/build/ working
I have build my very first application to Android and I want now to
I want to use Intellij Idea instead of Eclipse, but I can't even build
I am trying to use the built in android search for my app. The
I have an app that's built for Android 2.2, so I'm not using the
Im new to android. I have been writing my first app, I testing it
I have been playing around with my phonegap app in eclipse using android sdk

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.