Questions tagged [onresume]

onResume is an Activity life-cycle event generated by the Android OS when an Activity becomes the top-most one in the stack.

onResume is an Activity life-cycle event generated by the Android OS when an Activity becomes the top-most one in the stack.

More can be read about this at the Android Developer Site.

712 questions
0
votes
6 answers

Restart Android activity on relaunch of application

I had 3 activities in an android application. The application will exit when I press back button in each activity. Using the following code. When I press back from the third activity, the application exits fine but when I relaunch the application…
ramesh
  • 4,008
  • 13
  • 72
  • 117
0
votes
1 answer

How to run a method of a fragment from an activity, using Tags?

I've got a little app in which I created three swipeable tabs using eclipse. One of these is a common fragment while the second and third are ListFragments each of them gets it's data from a Cursor. I experiment with it and wanted to delete the…
0
votes
1 answer

AsyncTask re-executing onresume

I have this little problem. I fetch data from network into a ListView using AsyncTask. If I press on an item it takes me to another activity. Then, if I press the 'back' button, the AsyncTask does not execute again. (Which is exactly what I…
0
votes
1 answer

Weird situation on onClick(), if else condition is failing

I'm having a very weird situation in my app. I have an activity, on which I have log in button. On button click I'm checking whether user is logged in or not, and simultaneously showing proper message. My code looks like this: @Override public void…
Anupam
  • 3,742
  • 18
  • 55
  • 87
0
votes
1 answer

onResume() equivalent for Fragments in Android

I am working on an application that does http requests to a server. I have a TabBarController extending FragmentActivity that controls the fragments through 3 buttons. Each button shows a specific fragment and hides the others. I want to do a http…
Maio
  • 35
  • 6
0
votes
1 answer

Where to call code after network status was changed

I am working on an Android app, that needs to be connected to the internet in order to work(to populate a listView). So obviously, when i enter in it, i check to see if there is a connection (this linked helped me in that way : Display an alert when…
Teshte
  • 624
  • 1
  • 7
  • 26
0
votes
1 answer

How to create activity for browse a url with onpause and onresume?

Can you please help me on this? How to create a activity which runs a url at oncreate method if Internet connection is available? I want to check Internet connection is available or not every 5 seconds, if Internet connection gone it will alert as…
user1716635
0
votes
2 answers

activity onPause how to save the interface data

Hello I have in my app 2 activities and I want that when I switch between them the user interface and the Variables wont change is there any way to do it. Thanks for the help
dorbt12
  • 139
  • 2
  • 10
0
votes
1 answer

How to draw to canvas on onResume

I have an android app that draws to a canvas. Up to now I've been drawing each time I create the app usine onCreate as such: package com.example.drawdemo; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; public…
WildBill
  • 9,143
  • 15
  • 63
  • 87
0
votes
2 answers

Button syncronized with thread android

How create a button which pause the thread which is inside the loop and another button which resumes. Runnable myRun = new Runnable(){ public void run(){ for(int j =0 ;j<=words.length;j++){ synchronized(this){ try { …
lavin
  • 1
  • 2
0
votes
2 answers

Refreshing a View in onResume Android

How can I refresh my View to update? The reason I want to do this is because I have an ImageButton that will only be displayed if a certain condition is true. When the user navigates back to the Activity. This is the code I have in my onResume…
Javacadabra
  • 5,578
  • 15
  • 84
  • 152
0
votes
1 answer

Android: onResume() crashes on HttpRequest to Google Places

Before making an HttpRequest to Google Places, I need to check for a connection. If there is no active connection, it will display "No Connection" to the user, otherwise it will get the current location and perform the request. Some test cases: a)…
Gideon Pyzer
  • 22,610
  • 7
  • 62
  • 68
0
votes
3 answers

How to identify which Activity was 'opened' in onResume

In my main activity I want to override the onResume method so it acts differently, depending on the activity, which was opened before. For example: if the user creates a new Item for the listView (in the addNewItem activity), I need to reload the…
telina
  • 166
  • 1
  • 1
  • 11
0
votes
2 answers

cancel the events of lock/unlock on my android application

When i unlock my device to see my application, the process in onResume() is launched. How do I cancel the events of unlock, to avoid onResume() from processing?
user1482868
  • 31
  • 2
  • 5
0
votes
1 answer

onResume mess up my layout and make icons larger

I have an application which includes onCreate and OnResume as follows: MenuActivity public class MenuActivity extends Activity { AdView adView ; TextView tv; int weekSince; int numberOfDaysSince; static String DueDateChanged =…
Android Developer
  • 1,039
  • 1
  • 9
  • 33