-1

I created an app which load data from server and format it in specific format in android UI components, like text view and image view, but the loading take long time, i want to know what is the best way to decrease the load time and increase the loading speed and the quality of my app, if you know a book name or blog or wiki don't hesitate to till me. If you want to see the developed and published app which I'm talking about, please visit Wasfati app on android market.

Many thanks in advance.

Mohammad Abu Hmead
  • 621
  • 2
  • 7
  • 18

2 Answers2

2

To load the data from server it is better to use Asynctask along with ProgressDialog. And to load images Lazy loading of images is the best solution.

Read here for AsyncTask

fedors lazylist sample

Community
  • 1
  • 1
Abhi
  • 8,935
  • 7
  • 37
  • 60
0

1. Always keep the UI work on UI thread, and Non-UI work on the Non-UI thread, was a good programming approach, but became a law with the arrival of HoneyComb android Version.

2. When an Android App start you begin on UI thread, now to keep UI thread responsive, we need to do all the process heavy task on the Non-UI thread.

3 You can do this using a simple thread along with Handler, where you do the Non-UI work in the thread and then show the Output on the UI using the Handler.

4. The other better approach is AsyncTask, which was introduced in android, and is also known as Painless Threading. This automatically Synchronizes the UI and Non-UI thread.

5. Now about the Delay, this sometimes depends on your Internet connectivity... But yes using the thread to handle different Non-UI work and then putting it on the UI thread, helps in reducing the lags...

Kumar Vivek Mitra
  • 33,294
  • 6
  • 48
  • 75