Back to project page android-process-button.
The source code is released under:
MIT License
If you think the Android project android-process-button listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.dd.sample; /*from w ww.j a v a 2 s .co m*/ import com.dd.processbutton.iml.GenerateProcessButton; import com.dd.sample.utils.ProgressGenerator; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Toast; public class UploadActivity extends Activity implements ProgressGenerator.OnCompleteListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_upload); final ProgressGenerator progressGenerator = new ProgressGenerator(this); final GenerateProcessButton btnUpload = (GenerateProcessButton) findViewById(R.id.btnUpload); btnUpload.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { progressGenerator.start(btnUpload); btnUpload.setEnabled(false); } }); } @Override public void onComplete() { Toast.makeText(this, R.string.Loading_Complete, Toast.LENGTH_LONG).show(); } }