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; // ww w .j ava 2s . co m import com.dd.processbutton.iml.SubmitProcessButton; import com.dd.sample.utils.ProgressGenerator; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.Toast; public class MessageActivity extends Activity implements ProgressGenerator.OnCompleteListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_message); final EditText editMessage = (EditText) findViewById(R.id.editMessage); final ProgressGenerator progressGenerator = new ProgressGenerator(this); final SubmitProcessButton btnSend = (SubmitProcessButton) findViewById(R.id.btnSend); btnSend.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { progressGenerator.start(btnSend); btnSend.setEnabled(false); editMessage.setEnabled(false); } }); } @Override public void onComplete() { Toast.makeText(this, R.string.Loading_Complete, Toast.LENGTH_LONG).show(); } }