To launch a new activity you should be using code something like this: Intent intent = new Intent(getApplicationContext(), ClassNameHere.class); startActivity(intent);
Then you also need to add your Activity to the AndroidManifest.xml file, if your using eclipse you can open the AndroidManifest file and go to: Application (Tab) > *scroll to bottom* > Add > Select Activity > Then copy the fields from the existing Activity This will create the xml for you, which will look a little something like: <activity android:name=".ClassName" android:label="@string/app_name"></ activity> Hope that helps, Matt On Feb 25, 11:02 am, NewDev <kna...@gmail.com> wrote: > Hi, > > I am new to android. I am trying to write a small application. > I have one screen(activity), on clicking it should open another screen > (activity). I am trying to use intents. But somehow my application is > not working. > I have a list of items for Tip calculator and Currency calculator > (using listView), on clicking on one item for Tip calculator, another > screen should open that has tip calculator screen. Where there are > buttons for entering the amount and percentage amount for tip. > > I am writing the intent as the following in the Convertor > screen(activity): > Intent intent = new Intent( Convertor.this,tip.class); > startActivity(intent); > > Now I am not able to get what to be written for intent in the tip. > class,i.e., in another activity where the implementation for tip is > present. > > Could anybody can help me? > > Thanks in advance, > > naina -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en