Android Open Source - cellar-communicator Comment Box






From Project

Back to project page cellar-communicator.

License

The source code is released under:

GNU General Public License

If you think the Android project cellar-communicator 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.vinit.orderplacer;
//  w w w . j av a2s.  co  m
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class CommentBox extends Activity {

  EditText e;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_comment_box);
    
    e = (EditText)findViewById(R.id.comment);
    Button b = (Button)findViewById(R.id.submit_comment);
    
    b.setOnClickListener(new OnClickListener()  {

      @Override
      public void onClick(View v) {
        Intent i = getIntent();
        Bundle b = i.getExtras();
        DumpJSON dumptask = new DumpJSON(b.getString("data"), b.getString("salesman"), b.getString("party"), e.getText().toString());
        dumptask.execute();

        Toast.makeText(getApplicationContext(), "Done!", Toast.LENGTH_SHORT).show();
        Intent reset_intent = new Intent(getApplicationContext(), SecurityPIN.class);
        reset_intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        getApplicationContext().startActivity(reset_intent);
      }
      
    });
  }
}




Java Source Code List

com.vinit.orderplacer.CategoryList.java
com.vinit.orderplacer.CheckPin.java
com.vinit.orderplacer.CommentBox.java
com.vinit.orderplacer.CounterOnClickListener.java
com.vinit.orderplacer.DumpJSON.java
com.vinit.orderplacer.IPGetter.java
com.vinit.orderplacer.RetrieveJSON.java
com.vinit.orderplacer.RetrieveSalesmen.java
com.vinit.orderplacer.SalesApp.java
com.vinit.orderplacer.SalesHistory.java
com.vinit.orderplacer.Salesman.java
com.vinit.orderplacer.SecurityPIN.java
com.vinit.orderplacer.SummaryActivity.java