Back to project page cellar-communicator.
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.
package com.vinit.orderplacer; /*w w w . j a v a2s.c o 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.Spinner; import android.widget.Toast; public class Salesman extends Activity { Button next, history; Intent g, i; Spinner parties; RetrieveSalesmen r; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_salesman); g = getIntent(); final String salesman = g.getStringExtra("salesman"); Toast.makeText(this, "Welcome, " + salesman, Toast.LENGTH_SHORT).show(); next = (Button) findViewById(R.id.next); history = (Button) findViewById(R.id.history); parties = (Spinner) findViewById(R.id.partylist); r = new RetrieveSalesmen(this, parties, salesman); r.execute(); next.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { i = new Intent(getApplicationContext(), CategoryList.class); i.putExtra("salesman", salesman); i.putExtra("party", parties.getSelectedItem().toString()); startActivity(i); } }); history.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO separate intents i = new Intent(getApplicationContext(), SalesHistory.class); i.putExtra("salesman", salesman); startActivity(i); } }); } }