The TodayActivity activity
Let's see what we have in the main activity—TodayActivity
. In the onCreate
method, we set the activity_main.xml
layout as the content view. And we have WearableListView
with action_list
tied to the ListViewAdapter
class.
Note that the TodayActivity
activity also implements the click listener for the WearableListView
class, which is why you see the onClick
handler method implemented right next to the onCreate
method.
At this point, the onClick
listener method is handling only the first item in the list view. It launches DayOfYearActivity
when it's clicked, and when the default Intent
bundle is passed:
public class TodayActivity extends Activity implements WearableListView.ClickListener
{
private static final String TAG = TodayActivity.class.getName();
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WearableListView listView = (WearableListView) findViewById...