Android Open Source - AndroidWear Main Activity






From Project

Back to project page AndroidWear.

License

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.

Java Source Code

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




Java Source Code List

net.alteridem.feedme.AssetUtils.java
net.alteridem.feedme.BeerActivity.java
net.alteridem.feedme.Constants.java
net.alteridem.feedme.MainActivity.java
net.alteridem.feedme.MenuService.java
net.alteridem.feedme.Menu.java
net.alteridem.feedme.RestaurantActivity.java
net.alteridem.feedme.RestaurantListAdapter.java