diff options
author | Tor Norbye <tnorbye@google.com> | 2012-06-18 11:45:52 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-06-18 12:28:09 -0700 |
commit | 8624e045922e68ccca262a25e44ad979447c17a9 (patch) | |
tree | f98ab2310b0b13323b3e613f06271f5258b177b2 /templates | |
parent | 480e305192e65f5e69687bbc6dafbebfa9e1edbc (diff) | |
download | sdk-8624e045922e68ccca262a25e44ad979447c17a9.zip sdk-8624e045922e68ccca262a25e44ad979447c17a9.tar.gz sdk-8624e045922e68ccca262a25e44ad979447c17a9.tar.bz2 |
Rename template file from _ prefix
One of the template files ended up not getting packaged,
probably because it started with a "_".
Also, add @Override to some methods overriding a superclass
method (onCreate(Bundle)) and fix an NPE.
Change-Id: Ic2f15d968cca156704146bdc4ec501d1359a7620
Diffstat (limited to 'templates')
-rw-r--r-- | templates/activities/BlankActivity/root/src/app_package/DropdownActivity.java.ftl | 3 | ||||
-rw-r--r-- | templates/activities/BlankActivity/root/src/app_package/SimpleActivity.java.ftl | 3 | ||||
-rw-r--r-- | templates/activities/BlankActivity/root/src/app_package/TabsActivity.java.ftl | 3 | ||||
-rw-r--r-- | templates/activities/BlankActivity/root/src/app_package/TabsAndPagerActivity.java.ftl | 3 | ||||
-rw-r--r-- | templates/activities/BlankActivity/root/src/app_package/include_onOptionsItemSelected.java.ftl (renamed from templates/activities/BlankActivity/root/src/app_package/_onOptionsItemSelected.java.ftl) | 0 | ||||
-rw-r--r-- | templates/activities/MasterDetailFlow/root/src/app_package/ContentListActivity.java.ftl | 1 |
6 files changed, 9 insertions, 4 deletions
diff --git a/templates/activities/BlankActivity/root/src/app_package/DropdownActivity.java.ftl b/templates/activities/BlankActivity/root/src/app_package/DropdownActivity.java.ftl index cb2d894..a7bbff0 100644 --- a/templates/activities/BlankActivity/root/src/app_package/DropdownActivity.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/DropdownActivity.java.ftl @@ -21,6 +21,7 @@ public class ${activityClass} extends FragmentActivity implements ActionBar.OnNa private static final String STATE_SELECTED_NAVIGATION_ITEM = "selected_navigation_item"; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.${layoutName}); @@ -67,7 +68,7 @@ public class ${activityClass} extends FragmentActivity implements ActionBar.OnNa getMenuInflater().inflate(R.menu.${menuName}, menu); return true; } - <#include "_onOptionsItemSelected.java.ftl"> + <#include "include_onOptionsItemSelected.java.ftl"> @Override public boolean onNavigationItemSelected(int position, long id) { diff --git a/templates/activities/BlankActivity/root/src/app_package/SimpleActivity.java.ftl b/templates/activities/BlankActivity/root/src/app_package/SimpleActivity.java.ftl index eb46d9c..70cc3f7 100644 --- a/templates/activities/BlankActivity/root/src/app_package/SimpleActivity.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/SimpleActivity.java.ftl @@ -8,6 +8,7 @@ import android.support.v4.app.NavUtils; public class ${activityClass} extends Activity { + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.${layoutName}); @@ -21,5 +22,5 @@ public class ${activityClass} extends Activity { getMenuInflater().inflate(R.menu.${menuName}, menu); return true; } - <#include "_onOptionsItemSelected.java.ftl"> + <#include "include_onOptionsItemSelected.java.ftl"> } diff --git a/templates/activities/BlankActivity/root/src/app_package/TabsActivity.java.ftl b/templates/activities/BlankActivity/root/src/app_package/TabsActivity.java.ftl index 0811492..ba5c26c 100644 --- a/templates/activities/BlankActivity/root/src/app_package/TabsActivity.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/TabsActivity.java.ftl @@ -20,6 +20,7 @@ public class ${activityClass} extends FragmentActivity implements ActionBar.TabL private static final String STATE_SELECTED_NAVIGATION_ITEM = "selected_navigation_item"; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.${layoutName}); @@ -56,7 +57,7 @@ public class ${activityClass} extends FragmentActivity implements ActionBar.TabL getMenuInflater().inflate(R.menu.${menuName}, menu); return true; } - <#include "_onOptionsItemSelected.java.ftl"> + <#include "include_onOptionsItemSelected.java.ftl"> @Override public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) { diff --git a/templates/activities/BlankActivity/root/src/app_package/TabsAndPagerActivity.java.ftl b/templates/activities/BlankActivity/root/src/app_package/TabsAndPagerActivity.java.ftl index 850483f..58f6452 100644 --- a/templates/activities/BlankActivity/root/src/app_package/TabsAndPagerActivity.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/TabsAndPagerActivity.java.ftl @@ -33,6 +33,7 @@ public class ${activityClass} extends FragmentActivity<#if navType?contains("tab */ ViewPager mViewPager; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.${layoutName}); @@ -82,7 +83,7 @@ public class ${activityClass} extends FragmentActivity<#if navType?contains("tab getMenuInflater().inflate(R.menu.${menuName}, menu); return true; } - <#include "_onOptionsItemSelected.java.ftl"> + <#include "include_onOptionsItemSelected.java.ftl"> <#if navType?contains("tabs")> @Override diff --git a/templates/activities/BlankActivity/root/src/app_package/_onOptionsItemSelected.java.ftl b/templates/activities/BlankActivity/root/src/app_package/include_onOptionsItemSelected.java.ftl index c77fdee..c77fdee 100644 --- a/templates/activities/BlankActivity/root/src/app_package/_onOptionsItemSelected.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/include_onOptionsItemSelected.java.ftl 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 d75c5c3..9edf5c8 100644 --- a/templates/activities/MasterDetailFlow/root/src/app_package/ContentListActivity.java.ftl +++ b/templates/activities/MasterDetailFlow/root/src/app_package/ContentListActivity.java.ftl @@ -11,6 +11,7 @@ public class ${CollectionName}Activity extends FragmentActivity private boolean mTwoPane; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_${collection_name}); |