or use StartActivityforResult... Do a search for
StartActivityforResult

On Feb 13, 10:47 am, Immy <[email protected]> wrote:
> Use intents this way,
> Intent i = new Intent(this, CardView.class);
> startActivity(i);
>
> Close with finish() for that activity when you are done.
>
> This's how you override the back button to prevent it from going back.
>
> @Override
>     public boolean onKeyDown(int keyCode, KeyEvent event) {
>         // TODO Auto-generated method stub
>
>         switch(KeyEvent.KEYCODE_BACK)
>         {
>                 case KeyEvent.KEYCODE_BACK:
>                         return true;
>         }
>         return super.onKeyDown(keyCode, event);
>     }
>
> Regards,
> Immanuel
>
> On Feb 12, 9:58 am, Naina K <[email protected]> wrote:
>
> > Hi,
>
> > Thanks for replying. Yes, i have to use two separate activities to
> > display screens. No I am not using the finish() in the first activitiy
> > :-( To be frank as I am still learning this android development, I am
> > not getting how to use two different activities to display screens. I
> > just know that I need to use two activities in my application and
> > tried also but somehow its not working :-( I guess if I am having two
> > activities then i need to use intents for the same. But I guess
> > something is going wrong in using intents.
>
> > Could you please guide me for this with some sample application? I
> > would be greatfull :-)
>
> > Thanks,
>
> > On 2/12/09, Sundog <[email protected]> wrote:
>
> > > By "screens", do you mean separate activities displaying screens?
> > > That's the first thing. Only activities will work correctly with the
> > > back button.
>
> > > If you are properly doing it with two separate activities, how are you
> > > calling the second one? Are you using a finish() in the first
> > > activity? If so, remove it.
>
> > > On Feb 11, 4:30 pm, Komal <[email protected]> wrote:
> > >> Hello NewDev,
> > >> I am facing the same problem.do u have solution of it???if u have then
> > >> please post it.
> > >> Thanx.
>
> > >> On Feb 5, 9:47 pm, NewDev <[email protected]> wrote:
>
> > >> > Hi,
>
> > >> > I have anapplicationwith main view having a search button. On
> > >> > clicking the search button, search results are displayed in a text
> > >> > view. When I hit thebackbutton at this view, instead of navigating
> > >> > to the previous screen,applicationitself gets closed.  Could anybody
> > >> > please let me know how togobackto previous screen.
>
> > >> > Thanks in andvance,
>
> > >> > Naina- Hide quoted text -
>
> > >> - Show quoted text -
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to