Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A good part of the solution can be found at <a href="http://www.helloandroid.com/tutorials/using-threads-and-progressdialog" rel="nofollow">http://www.helloandroid.com/tutorials/using-threads-and-progressdialog</a></p> <pre><code>package any....; import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.widget.LinearLayout; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; public class CopyOfActivityConfigs extends Activity implements Runnable { Context context = this; public static ProgressDialog progressSpinner; public TableLayout tableLayoutAppsProtect; public TableLayout tableLayoutAppsProtectIn; final Handler handler = new Handler() { @Override public void handleMessage( Message message) { String sResult = (String) message.obj; if( (sResult != null) &amp;&amp; (sResult != "")) { tableLayoutAppsProtect = (TableLayout) findViewById( R.id.tableLayoutAppsProtect); tableLayoutAppsProtect.addView( tableLayoutAppsProtectIn); if( progressSpinner != null) progressSpinner.dismiss(); } return; } }; public void run() { final Message message = handler.obtainMessage( 1, fThreadAppsProtectListGenerate( context)); handler.sendMessage( message); } public String fThreadAppsProtectListGenerate( Context context) { tableLayoutAppsProtectIn = new TableLayout( context); if( tableLayoutAppsProtectIn != null) tableLayoutAppsProtectIn.removeAllViews(); TableRow tableRow = new TableRow( context); LinearLayout linearLayout = new LinearLayout( context); TextView textViewSiteNow = new TextView( context); textViewSiteNow.setText( "..."); linearLayout.addView( textViewSiteNow); tableRow.addView( linearLayout); tableLayoutAppsProtectIn.addView( tableRow); if( progressSpinner != null) progressSpinner.dismiss(); return "any"; } @Override public void onCreate( Bundle savedInstanceState) { super.onCreate( savedInstanceState); setContentView( R.layout.configappsprotect); progressSpinner = new ProgressDialog( this); progressSpinner.setMessage( getString( R.string.sSpinnerAppsProtectListGenerate)); progressSpinner.show(); Thread thread = new Thread( this); thread.start(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload