diff options
author | Roman Nurik <romannurik@google.com> | 2012-10-01 13:00:24 -0700 |
---|---|---|
committer | Roman Nurik <romannurik@google.com> | 2012-10-01 13:00:24 -0700 |
commit | 228754925c73ac777f4c2df990f1a50e0b3bec75 (patch) | |
tree | 17d6dbd2606461849cffdfc5ae1cd903479add40 /templates/activities/BlankActivity/root/src/app_package | |
parent | 68e7bebeb651920e115db5986b30f3099e724a08 (diff) | |
download | sdk-228754925c73ac777f4c2df990f1a50e0b3bec75.zip sdk-228754925c73ac777f4c2df990f1a50e0b3bec75.tar.gz sdk-228754925c73ac777f4c2df990f1a50e0b3bec75.tar.bz2 |
Ensure ADT app templates' activity onCreate is protected.
It's considered a best practice for activity onCreate overrides to maintain the
original visibility of the method, which is protected. Implement this for all
activity templates.
Change-Id: Ia501628a3f330f671398935103fafc1834f8e78e
Diffstat (limited to 'templates/activities/BlankActivity/root/src/app_package')
4 files changed, 4 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 fb19202..f2549ad 100644 --- a/templates/activities/BlankActivity/root/src/app_package/DropdownActivity.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/DropdownActivity.java.ftl @@ -26,7 +26,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) { + protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.${layoutName}); 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 a409ad4..feae824 100644 --- a/templates/activities/BlankActivity/root/src/app_package/SimpleActivity.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/SimpleActivity.java.ftl @@ -11,7 +11,7 @@ import android.support.v4.app.NavUtils; public class ${activityClass} extends Activity { @Override - public void onCreate(Bundle savedInstanceState) { + protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.${layoutName}); <#if parentActivityClass != ""> 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 b0a2f5d..0bf975e 100644 --- a/templates/activities/BlankActivity/root/src/app_package/TabsActivity.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/TabsActivity.java.ftl @@ -23,7 +23,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) { + protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.${layoutName}); 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 9e82449..7aa79bd 100644 --- a/templates/activities/BlankActivity/root/src/app_package/TabsAndPagerActivity.java.ftl +++ b/templates/activities/BlankActivity/root/src/app_package/TabsAndPagerActivity.java.ftl @@ -35,7 +35,7 @@ public class ${activityClass} extends FragmentActivity<#if navType?contains("tab ViewPager mViewPager; @Override - public void onCreate(Bundle savedInstanceState) { + protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.${layoutName}); |