Android Open Source - android-process-button Message Activity






From Project

Back to project page android-process-button.

License

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.

Java Source Code

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();
    }

}




Java Source Code List

com.dd.processbutton.FlatButton.java
com.dd.processbutton.ProcessButton.java
com.dd.processbutton.iml.ActionProcessButton.java
com.dd.processbutton.iml.GenerateProcessButton.java
com.dd.processbutton.iml.SubmitProcessButton.java
com.dd.sample.MainActivity.java
com.dd.sample.MessageActivity.java
com.dd.sample.SignInActivity.java
com.dd.sample.StateSampleActivity.java
com.dd.sample.UploadActivity.java
com.dd.sample.utils.ProgressGenerator.java