Back to project page AndroidWear.
The source code is released under:
MIT License
If you think the Android project AndroidWear 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 net.alteridem.feedme; //from w w w . ja v a 2s . co m import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.ListView; public class MainActivity extends ListActivity { private static final String TAG = "FeedMe"; private RestaurantListAdapter mAdapter; @Override protected void onListItemClick(ListView l, View v, int position, long id) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG , "onListItemClick " + position); } String itemName = mAdapter.getItemName(position); Intent intent = new Intent(getApplicationContext(), RestaurantActivity.class); intent.putExtra(Constants.RESTAURANT_TO_LOAD, itemName); startActivity(intent); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(android.R.layout.list_content); mAdapter = new RestaurantListAdapter(this); setListAdapter(mAdapter); } }