aboutsummaryrefslogtreecommitdiffstats
path: root/templates/activities
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-07-14 08:53:34 -0700
committerTor Norbye <tnorbye@google.com>2012-07-14 12:59:59 -0700
commitef297cc99f4e4adda22fbe1a94db815f56e973f3 (patch)
treec15904431a03014b7c621930b2f35409964e74ee /templates/activities
parent0d8f973905a4925e00eb9e32887c192b2148b29f (diff)
downloadsdk-ef297cc99f4e4adda22fbe1a94db815f56e973f3.zip
sdk-ef297cc99f4e4adda22fbe1a94db815f56e973f3.tar.gz
sdk-ef297cc99f4e4adda22fbe1a94db815f56e973f3.tar.bz2
Reference android.R in template rather than importing it
Change-Id: I84ffc48d8c57ac3f46ab28b62be4785135f2878d
Diffstat (limited to 'templates/activities')
-rw-r--r--templates/activities/MasterDetailFlow/root/src/app_package/ContentListActivity.java.ftl2
-rw-r--r--templates/activities/MasterDetailFlow/root/src/app_package/ContentListFragment.java.ftl5
2 files changed, 4 insertions, 3 deletions
diff --git a/templates/activities/MasterDetailFlow/root/src/app_package/ContentListActivity.java.ftl b/templates/activities/MasterDetailFlow/root/src/app_package/ContentListActivity.java.ftl
index 9edf5c8..4456815 100644
--- a/templates/activities/MasterDetailFlow/root/src/app_package/ContentListActivity.java.ftl
+++ b/templates/activities/MasterDetailFlow/root/src/app_package/ContentListActivity.java.ftl
@@ -3,8 +3,10 @@ package ${packageName};
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
+<#if parentActivityClass != "">
import android.support.v4.app.NavUtils;
import android.view.MenuItem;
+</#if>
public class ${CollectionName}Activity extends FragmentActivity
implements ${CollectionName}Fragment.Callbacks {
diff --git a/templates/activities/MasterDetailFlow/root/src/app_package/ContentListFragment.java.ftl b/templates/activities/MasterDetailFlow/root/src/app_package/ContentListFragment.java.ftl
index 6b4b9a0..7de2868 100644
--- a/templates/activities/MasterDetailFlow/root/src/app_package/ContentListFragment.java.ftl
+++ b/templates/activities/MasterDetailFlow/root/src/app_package/ContentListFragment.java.ftl
@@ -2,7 +2,6 @@ package ${packageName};
import ${packageName}.dummy.DummyContent;
-import android.R;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
@@ -35,8 +34,8 @@ public class ${CollectionName}Fragment extends ListFragment {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<DummyContent.DummyItem>(getActivity(),
- R.layout.simple_list_item_activated_1,
- R.id.text1,
+ android.R.layout.simple_list_item_activated_1,
+ android.R.id.text1,
DummyContent.ITEMS));
}