You should store the stuff you get from the internet permanently so you don't get it every time you show the activity, that way it will load much faster.
Up vote 0 down vote favorite share g+ share fb share tw.
In my android application, there is an activity to add a search keyword to the list. After adding a keyword, the user has to press the back button to go to the previous activity. In the previous activity I am getting data from the internet according to the keyword which I added.
My problem is that when I pressed the back button it will take the same time to go to the previous activity. How can I speed up this process? My code: goBack = (ImageView) findViewById(R.id.
Backbutton); goBack. SetOnClickListener(new OnClickListener() { @Override public void onClick(View v) { onBackPressed(); } }); @Override public void onBackPressed() { super.onBackPressed(); isBackPressed=true; finish(); } android android-activity link|improve this question edited Mar 2 at 15:10Daniel Fischer21.8k53164 asked Mar 2 at 11:33kaluwila946 36% accept rate.
9 you don't need to call finish if you called super.onBackPressed() – njzk2 Mar 2 at 11:34.
A dialog is much lighter and displays much much faster :) It should look something like this- For an example, try the DIALOG_TEXT_ENTRY dialog in the ALERT DIALOG sample API Demos here developer.android.com/resources/samples/....
If so, that is your problem. The activity you have shown is plenty fast, but your previous activity spends some time resuming (because of the internet download). This is bad for two reasons: The responsiveness goes bad.
If the user has a bad connection everything will freeze! If the user is using a Honeycomb device (maybe also ICS, I haven't tried) it will throw an exception and either crash or (if you catch it) just fail to work. Your solution is to do the download in a background thread, maybe with a dialog telling the user to please wait, showing the download progress if available.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.