[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-23 Thread Komal
Hi,, The Problem is solved, I am posting the solution because some body may face same problem and need solution. In my app i am using startManagingCursor(c) for managing cursor,,so the method handles all functions of cursor,,i doesn’t need to close the cursor. I have removed all c.close() from

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-22 Thread Immy
Constants is just another class, created by you. Just used it to store static variables... U need to define it... :) On Feb 19, 5:28 am, Komal komal...@gmail.com wrote: Hi Immy, Thnx for replying. I am facing an error when i m using Constants. It can't find Constants class/interface. It

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-18 Thread Komal
Hi Immy, Thnx for replying. I am facing an error when i m using Constants. It can't find Constants class/interface. It is in android sdk or Something i need to define??? On Feb 17, 4:54 pm, Immy immanueln2...@gmail.com wrote: By default the function of back is to go to the previous activity.

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-16 Thread Immy
By default the function of back is to go to the previous activity. So dont override it. Try using Calling Activity: onActivityForResult(intent, Constants.SUBACTIVITY_RESULTCODE_MOVEBACK) @Override protected void onActivityResult(int requestCode, int resultCode, String data,

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-15 Thread Komal
Hi Immy Thnx for replying. I want to use the back button for going back, i dont want to prevent it. Close with finish() for that activity when you are done. and if i am calling finish(),,then it is not showing the employee detail, it just go to the next activity(employee activity page) call

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-12 Thread Sundog
I am still just learning Android myself, but from what I can see of your problem, a quick study of how the Notepad demo app does it should provide some help. On Feb 11, 9:58 pm, Naina K kna...@gmail.com wrote: Hi, Thanks for replying. Yes, i have to use two separate activities to display

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-12 Thread Komal
Hi, I am facing the same paroblem as Naina's. I have one activity which displays list of name of employees. I m fetching the employees name from database. when i click on any of the name ,i will display the next page(new activity) showing details of that employee. also fetching details of

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-12 Thread Immy
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) { //

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-11 Thread Komal
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 kna...@gmail.com wrote: Hi, I have anapplicationwith main view having a search button. On clicking the search button, search results are displayed in a text

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-11 Thread Dianne Hackborn
Implement onKeyDown() to catch the back button. On Thu, Feb 5, 2009 at 2:47 AM, NewDev kna...@gmail.com wrote: Hi, I have an application with main view having a search button. On clicking the search button, search results are displayed in a text view. When I hit the back button at this

[android-developers] Re: How to prevent my application being closed on clicking the back button on emulator

2009-02-11 Thread Naina K
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