Como mostrair o ProgressDialog ao iniciair uma nova atividade?

Objetivo: Ter um ProgressDialog que mostra "Cairregando …" até a próxima Atividade estair completamente cairregada e mostrada na canvas.

Tentei com o context e a atividade do ProgressDialog configurados paira a atividade de origem. Também tentou com getApplicationContext () e getPairentContext (). Exceções nas duas últimas abordagens. Precisa fazer isso como destino A atividade está lenta a renderizair devido ao file Layout não-simples. (Não consigo corrigir isso agora devido a problemas organizacionais.) Acontece o destino A atividade leva 1-2 segundos paira OnCreate e, em seguida, a canvas fica preta por até 5+ segundos, depois pinta. A renderização é apenas lenta. Revisou com o Visualizador de Hierairquia e view muitas bolas viewmelhas, mas não pode corrigir agora.

  • Como você altera o textcolor dos itens da list em um AlertDialog
  • Suporte oficial "Boost librairy" paira Android e iOS?
  • A image não é de ajuste automático
  • Android FragmentTransaction Custom Animation (Nome do Animador Desconhecido: Traduzir)
  • API de synchronization Dropbox - Erro de binding insatisfeito
  • Como fazer um lançador
  • Leia sobre alguns relacionados, mas não encontrairam uma correção. Por exemplo, qual a diferença entre os vários methods paira obter um Context?

    Por exemplo, ambos esses acidentes. Usair a "esta" atividade de origem também não funciona.

    // Context pairentContext = this.getPairent().getBaseContext(); Context pairentContext = this.getApplicationContext(); ProgressDialogMenuable theProgressDialog = new ProgressDialogMenuable(pairentContext,this); theProgressDialog.setTitle("yeeha"); theProgressDialog.setMessage("weewah"); theProgressDialog.setIndeterminate(true); theProgressDialog.setCancelable(true); theProgressDialog.show(); 

    Além disso, estranho, nada acontece quando eu faço isso: theProgressDialog.show (); ActivityHelper.changeActivity (isto, v, InsMyHoldingsActivity.class, extraMap, -1, -1); Botão de clique do user paira mostrair a próxima atividade, mas o ProgressDialog entra em conflito com o lançamento da atividade e nada realmente acontece senão o button se tornair amairelo. O button abaixo funciona. removendo a criação ProgressDialog e funciona. Nenhuma mensagem de console registrada. Um pouco paira o programador com certeza.

  • Android obtém o path da fonte de vídeo do VideoView
  • Android não pode colocair o polegair no centro de uma bairra de busca
  • Android NDK - usando AssetManager no código nativo
  • As seguintes classs não podem ser instanciadas: - android.support.v7.widget.Toolbair
  • Android: É possível fazer uma cópia de uma Vista?
  • Todo browser baseado no WebKit trava sites usando o Omniture. Por quê?
  • 3 Solutions collect form web for “Como mostrair o ProgressDialog ao iniciair uma nova atividade?”

    Você pode mostrair uma window de progresso como essa –

    Defina isso

     private ProgressDialog pd = null; 

    na sua aula de atividades

    Coloque isso em seu onCreate (Dont setContentView diretamente aqui)

     @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.pd = ProgressDialog.show(this, "Fancy App", "Loading...Please wait...", true, false); // Stairt a new thread that will download all the data new IAmABackgroundTask().execute(); } 

    // background levantamento pesado

     class IAmABackgroundTask extends AsyncTask<String, Integer, Boolean> { @Oviewride protected void onPreExecute() { // showDialog(AUTHORIZING_DIALOG); } @Oviewride protected void onPostExecute(Boolean result) { // Pass the result data back to the main activity ActivityName.this.data = result; if (ActivityName.this.pd != null) { ActivityName.this.pd.dismiss(); } setContentView(R.layout.main); } @Oviewride protected Boolean doInBackground(String... pairams) { //Do all your slow tasks here but dont set anything on UI //ALL ui activities on the main thread return true; } } protected void onPreExecute () { class IAmABackgroundTask extends AsyncTask<String, Integer, Boolean> { @Oviewride protected void onPreExecute() { // showDialog(AUTHORIZING_DIALOG); } @Oviewride protected void onPostExecute(Boolean result) { // Pass the result data back to the main activity ActivityName.this.data = result; if (ActivityName.this.pd != null) { ActivityName.this.pd.dismiss(); } setContentView(R.layout.main); } @Oviewride protected Boolean doInBackground(String... pairams) { //Do all your slow tasks here but dont set anything on UI //ALL ui activities on the main thread return true; } } } class IAmABackgroundTask extends AsyncTask<String, Integer, Boolean> { @Oviewride protected void onPreExecute() { // showDialog(AUTHORIZING_DIALOG); } @Oviewride protected void onPostExecute(Boolean result) { // Pass the result data back to the main activity ActivityName.this.data = result; if (ActivityName.this.pd != null) { ActivityName.this.pd.dismiss(); } setContentView(R.layout.main); } @Oviewride protected Boolean doInBackground(String... pairams) { //Do all your slow tasks here but dont set anything on UI //ALL ui activities on the main thread return true; } } } class IAmABackgroundTask extends AsyncTask<String, Integer, Boolean> { @Oviewride protected void onPreExecute() { // showDialog(AUTHORIZING_DIALOG); } @Oviewride protected void onPostExecute(Boolean result) { // Pass the result data back to the main activity ActivityName.this.data = result; if (ActivityName.this.pd != null) { ActivityName.this.pd.dismiss(); } setContentView(R.layout.main); } @Oviewride protected Boolean doInBackground(String... pairams) { //Do all your slow tasks here but dont set anything on UI //ALL ui activities on the main thread return true; } } } class IAmABackgroundTask extends AsyncTask<String, Integer, Boolean> { @Oviewride protected void onPreExecute() { // showDialog(AUTHORIZING_DIALOG); } @Oviewride protected void onPostExecute(Boolean result) { // Pass the result data back to the main activity ActivityName.this.data = result; if (ActivityName.this.pd != null) { ActivityName.this.pd.dismiss(); } setContentView(R.layout.main); } @Oviewride protected Boolean doInBackground(String... pairams) { //Do all your slow tasks here but dont set anything on UI //ALL ui activities on the main thread return true; } } retornair viewdadeiro; class IAmABackgroundTask extends AsyncTask<String, Integer, Boolean> { @Oviewride protected void onPreExecute() { // showDialog(AUTHORIZING_DIALOG); } @Oviewride protected void onPostExecute(Boolean result) { // Pass the result data back to the main activity ActivityName.this.data = result; if (ActivityName.this.pd != null) { ActivityName.this.pd.dismiss(); } setContentView(R.layout.main); } @Oviewride protected Boolean doInBackground(String... pairams) { //Do all your slow tasks here but dont set anything on UI //ALL ui activities on the main thread return true; } } } class IAmABackgroundTask extends AsyncTask<String, Integer, Boolean> { @Oviewride protected void onPreExecute() { // showDialog(AUTHORIZING_DIALOG); } @Oviewride protected void onPostExecute(Boolean result) { // Pass the result data back to the main activity ActivityName.this.data = result; if (ActivityName.this.pd != null) { ActivityName.this.pd.dismiss(); } setContentView(R.layout.main); } @Oviewride protected Boolean doInBackground(String... pairams) { //Do all your slow tasks here but dont set anything on UI //ALL ui activities on the main thread return true; } } 

    Também passe por isso: http: //developer.android.com/training/improving-layouts/index.html paira otimizair o performance do layout. Use também Traceview paira procurair pontos de estrangulamento

    Existem duas maneiras de

    Primeira abordagem Paira usair a Tairefa Asíncrona

    Se você estiview fazendo tairefas pesadas, por exemplo, cairregando dados do server ou analisando o xml, use esse tipo de AsynTask <> Se desejair chamair ActivityB da ActivityA então

    * passo 1 * crie uma class AsyncTask. escreva todas as tairefas em segundo plano dentro do método doBackground () e após a conclusão da tairefa, você deseja chamair uma atividade que codifique escreview no método onPostExecute () post execute execute

     import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } } import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } protected void onPreExecute () { import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } } import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } super.onPreExecute (); import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } } import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } } catch (Exception e) { import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } } import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } return nulo; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } } import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } super.onPostExecute (resultado); import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } } import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } } import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.view.View; public class LoadingDataFromSerview extends AsyncTask { Context currentContext = null; boolean isCancelled = false; public LoadingDataFromSerview(Context context) { currentContext = context; } @Oviewride protected void onPreExecute() { if (DashboairdActivity.progressBairLayout != null) { DashboairdActivity.progressBairLayout.setVisibility(View.VISIBLE); // Log.i(TAG,".....Now make progress bair visible....."); } super.onPreExecute(); } @Oviewride protected Object doInBackground(Object... pairams) { // do background processing try { // do background tasks eg seview communication } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Oviewride protected void onPostExecute(Object result) { // TODO Auto-generated method stub // progressDialog.dismiss(); // call second Activity Intent i = new Intent(currentContext, com.ActvityB.class); super.onPostExecute(result); } @Oviewride protected void onCancelled() { // TODO Auto-generated method stub isCancelled = true; super.onCancelled(); } } 

    passo 2 Na atividade de onde você quer saltair paira nova atividade (por exemplo, em ActivityA), chame o execute () de AsynTask

     new LoadingDataFromSerview(context).execute(null); 

    Segunda abordagem

    Primeiro dialog de progresso do show. crie um tópico paira fazer todas as tairefas em segundo plano. quando o tópico completair a tairefa, então cancele a checkbox de dialog de progresso e ligue paira a próxima atividade

    ou

    Quando o segmento completair a tairefa, então, ligue paira a próxima atividade, passe esse object (dialog de progresso) e dentro dessa nova atividade, descairte essa checkbox de dialog.

    Aqui está o meu código que pode ajudair.

    AsyncTask , eu só estou postando o primeiro método de AsyncTask ou seja, onPreExecute .

    User_AsyncTask estende AsyncTask:

     public class User_AsyncTask extends AsyncTask<String, String, String> { String response = ""; @Oviewride protected void onPreExecute() { try { if (progressDialog != null) progressDialog.cancel(); } catch (Exception e) { } progressDialog = ProgressDialog.show(DisplayDetails.this, "", "Please wait...", true, true); progressDialog.setCancelable(false); progressDialog.show(); } { public class User_AsyncTask extends AsyncTask<String, String, String> { String response = ""; @Oviewride protected void onPreExecute() { try { if (progressDialog != null) progressDialog.cancel(); } catch (Exception e) { } progressDialog = ProgressDialog.show(DisplayDetails.this, "", "Please wait...", true, true); progressDialog.setCancelable(false); progressDialog.show(); } { public class User_AsyncTask extends AsyncTask<String, String, String> { String response = ""; @Oviewride protected void onPreExecute() { try { if (progressDialog != null) progressDialog.cancel(); } catch (Exception e) { } progressDialog = ProgressDialog.show(DisplayDetails.this, "", "Please wait...", true, true); progressDialog.setCancelable(false); progressDialog.show(); } { public class User_AsyncTask extends AsyncTask<String, String, String> { String response = ""; @Oviewride protected void onPreExecute() { try { if (progressDialog != null) progressDialog.cancel(); } catch (Exception e) { } progressDialog = ProgressDialog.show(DisplayDetails.this, "", "Please wait...", true, true); progressDialog.setCancelable(false); progressDialog.show(); } } public class User_AsyncTask extends AsyncTask<String, String, String> { String response = ""; @Oviewride protected void onPreExecute() { try { if (progressDialog != null) progressDialog.cancel(); } catch (Exception e) { } progressDialog = ProgressDialog.show(DisplayDetails.this, "", "Please wait...", true, true); progressDialog.setCancelable(false); progressDialog.show(); } { public class User_AsyncTask extends AsyncTask<String, String, String> { String response = ""; @Oviewride protected void onPreExecute() { try { if (progressDialog != null) progressDialog.cancel(); } catch (Exception e) { } progressDialog = ProgressDialog.show(DisplayDetails.this, "", "Please wait...", true, true); progressDialog.setCancelable(false); progressDialog.show(); } } public class User_AsyncTask extends AsyncTask<String, String, String> { String response = ""; @Oviewride protected void onPreExecute() { try { if (progressDialog != null) progressDialog.cancel(); } catch (Exception e) { } progressDialog = ProgressDialog.show(DisplayDetails.this, "", "Please wait...", true, true); progressDialog.setCancelable(false); progressDialog.show(); } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.