Reload activity in Android
Is it a good practice to reload an activity in Android? What would be the best way to do it? this.finish and then this.startActivity with the activity intent? ...
Is it a good practice to reload an activity in Android? What would be the best way to do it? this.finish and then this.startActivity with the activity intent? ...
So I have two Activities. The main is called Main, and the child one is called Child. When a button is clicked in the main activity it triggers the following piece of code: Intent i = new Intent(Main.this, Child.class); Main.this.startActivity(i); That opens the Child activity. As soon as I call finish() or press the back button with...
I want to create an app that contains a Service S and an Activity A. The Service S is responsible for preprocessing, such as preparing the data shown on the UI of the Activity A, before the Activity A gets invoked. I want to be able to invoke the Service S from outside the package, say from another Android app's Activity class B, do the...
hi, i have a quick question about the usage of activitymanager. i've looked at the source code and read through it and as expectedly, it gave info about how it worked. however, i am interested in at what place(s) in android OS uses this activity to actually manage activities. for example, when an activity starts, android will keep t...
In Android, if I want to do some background work, what is the difference between Creating a Service to do the work, and having the Activity start the Service VS. Creating a standard java class to do the work, and having the Activity create an object of the class and invoke methods, to do the work in separate thread. ...
I have a main activity which calls a child one via Intent I = new Intent(this, Child.class); startActivityForResult(I, 0); But as soon as Child becomes visible the main activity gets its onStop and immediately after that onDestroy method triggered. And as soon as I call finish() within the Child activity or press the back button, the ...
Can I use getCacheDir() only in a class that extends Activity? I would like to use it in an AsyncTask so that I can do the time intensive cache file saving in it. Thanks Chris ...
In one of my Activities I have a ListView that displays a list of locations. For each list item I want a little arrow icon that points in the direction of the corresponding location. I implemented this icon by extending ImageView. This custom View has a listener that reacts to changes of the device's orientation by rotating the icon imag...
I am needing to collect a list (In C#) of processes which currently (Or within the past x secs) have have network activity, the names of the processes, and the qty of data sent (Pretty much EXACTLY what is shown on the new Windows 7 Resource Monitor under the network tab). I know I could use WinPCap to write a complete sniffer myself, B...
Could you please explain me purpose and usage of LauncherActivity? Documentation says that it "Displays a list of all activities which can be performed for a given intent". I understood that it should automatically build list of all activities found in application and provide their launching. Am I right? And how to use it? I have found ...
Lets say we have a main class with 5 buttons, where when each clicked go to an activity that displays information with 2 textviews. The layout for all 5 activities will be the same, so naturally I would want to use one activity and reuse it by changing the text displayed in those 2 textviews for each button pressed. How can I do this? ...
In Android, the TabHost object renders activities in a type of inline way. I'm wondering if there's any way I can do a similar type of thing, without using the tab-host. Suppose, i want to have a toolbar or sliding drawer that allows me to switch between the activities in the same way that the TabHost does this. In other words, I'd...
Here's my two scenarios. 1 - User opens app for the first time ever from android home screen User is presented with "first time" screen (backed by first time activity, lets call it A) User hits back button user is returned to android home screen 2 - User opens app for second time User is presented with the main list screen of the app...
I'm trying to create multiple tabs, each with a different Activity. The only downside is i'm using a custom layout file thus my class extends an Activity rather than a TabActivity. While trying to run, it fails and suggests calling TabHost.Setup(ActivityGroupManager agm) Anyone have an idea/practical example of how this can be achieved?...
I need to build an activity feed to go on each users profile page showing what they have been doing on the site. There is three tables: comments, ratings, users I want the feed to include the comments and ratings that the user has posted. in the comments and ratings table it stores the user id of the user who posted it, not the userna...
This appears related to: http://stackoverflow.com/questions/3037512/android-application-doesnt-start-from-eclipse/3106897#3106897 Even with the Android 2.2 platform is this still the accepted way to operate the emulator? i.e. 1, 2, 3 start/kill processes as described in the above post? I am having a similar problem on WinXP with Eclips...
Hello, application (non-wanted) behavior - application is started, some text is put into text-box and notification is created through button action. user "clicks" the home button, application is "minimized", notification is available in bar user selects the notification and the application is "maximized" BUT - instead of the origi...
I have a problem on going back (clicking the Back button) from sub-activity to main activity: from my main activity I launch a new one (with passing some extras): Intent i = new Intent(getApplicationContext(), SearchResults.class); i.putExtra(SearchResults.RESULTS_EXTRA_KEY, searchResult); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); star...
I currently have a Service and an Activity in my application. I currently bind the Service to the activity without using AIDL as the Service and the Activity are in the same application. This allows me to call the methods from the Service within my Activity when I require them, however it doesn't let me call the methods of the Activity...
Hi guys, right to business. I have an activity feed which gets all different kinds of activity from different parts of my site sorts them all out by means of using UNION and an ORDER BY and then a LIMIT to get the top 25 and then displays the activity. My fellow programmer says that we will run into problems when we have more rows (cur...