March 2013
Beginner to intermediate
580 pages
16h 11m
English
To set the ground work for a user interface listing the runs, create a new default activity for the app called RunListActivity and set it as the default in the manifest. Ignore the error about RunListFragment for the moment.
Listing 34.11 The great and powerful RunListActivity (RunListActivity.java)
public class RunListActivity extends SingleFragmentActivity {
@Override
protected Fragment createFragment() {
return new RunListFragment();
}
}
Listing 34.12 Configuring RunListActivity (AndroidManifest.xml)
<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"><activity android:name=".RunActivity"<activity android:name=".RunListActivity" ...
Read now
Unlock full access