1

I have a project where my manifest is opening .MainActivity by default

 <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />

I want to be able to open an info screen on top of that app where it tells about my app. from there the user can press back to get back to the Main Activity.

BigDX
  • 3,519
  • 5
  • 38
  • 52

2 Answers2

0

You can start your info screen Activity in your MainActivity's onCreate() method with startActivity() method

Murat Nafiz
  • 1,438
  • 17
  • 28
  • That works perfect! i thought i had tried that and it didnt work but i was wrong. i have it my info activity starting with no title bar to tell users about my apps or changes when they happen. Thanks! – BigDX Mar 22 '13 at 23:06
  • Well, there was one more thing i wanted this to do. Can i have this only pop up when the app starts for the first time? – BigDX Mar 22 '13 at 23:09
  • found answer here http://stackoverflow.com/questions/7562786/android-first-run-popup-dialog – BigDX Mar 22 '13 at 23:29
0

Use an Intent in your MainActivity with a Button click or however you want the input to work

Intent intent = new Intent(MainActivity.this, NextActivityName.class); intent.putExtras("key", value); // if you want to send data // other intent attributes such as flags startActivity(intent);

Intents

If you are stuck on how to change Activities then you really should Start Here and go through the docs carefully so you understand the basics of the Android framework

codeMagic
  • 44,549
  • 13
  • 77
  • 93