Back to project page FoodFinderApp.
The source code is released under:
GNU General Public License
If you think the Android project FoodFinderApp 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 cs499.examples.semesterproject; //from w w w .j a va 2 s. c o m import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.Menu; import android.view.View; import android.widget.EditText; public class QueryActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_query); } public void sendSearchData (View view) { Bundle extras = getIntent().getExtras(); String username = extras.getString("username"); EditText searchCity = (EditText) findViewById (R.id.searchCity); EditText searchZip = (EditText) findViewById (R.id.searchZip); Intent i = new Intent (QueryActivity.this, DisplayMatchingPlaces.class); i.putExtra("username", username); i.putExtra("Search city", searchCity.getText().toString()); i.putExtra("Search zip", searchZip.getText().toString()); startActivity(i); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.query, menu); return true; } }