diff options
author | Roman Nurik <romannurik@google.com> | 2012-08-03 15:07:22 -0700 |
---|---|---|
committer | Roman Nurik <romannurik@google.com> | 2012-08-03 15:07:22 -0700 |
commit | 996f98d307c65fecfe7a441331ae120d8fd8b7df (patch) | |
tree | ccc12d28357275339c7e4852065c66eb3570e2a0 /templates/activities | |
parent | 1e1ed1b0e4693c3f6379c12c2ab58d90dbd47fe8 (diff) | |
download | sdk-996f98d307c65fecfe7a441331ae120d8fd8b7df.zip sdk-996f98d307c65fecfe7a441331ae120d8fd8b7df.tar.gz sdk-996f98d307c65fecfe7a441331ae120d8fd8b7df.tar.bz2 |
Minor app template fixes.
- Fix isLauncher check by casting to string.
- Move tools:context to root element in one of the XML files.
Change-Id: I568f82f8589479a54aceedabe97afffbef6bf510
Diffstat (limited to 'templates/activities')
3 files changed, 4 insertions, 4 deletions
diff --git a/templates/activities/BlankActivity/root/AndroidManifest.xml.ftl b/templates/activities/BlankActivity/root/AndroidManifest.xml.ftl index 3aa1627..1c6fbd1 100644 --- a/templates/activities/BlankActivity/root/AndroidManifest.xml.ftl +++ b/templates/activities/BlankActivity/root/AndroidManifest.xml.ftl @@ -8,7 +8,7 @@ <meta-data android:name="android.support.PARENT_ACTIVITY" android:value="${parentActivityClass}" /> </#if> - <#if isLauncher> + <#if isLauncher?string == "true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> diff --git a/templates/activities/BlankActivity/root/res/layout/activity_simple.xml.ftl b/templates/activities/BlankActivity/root/res/layout/activity_simple.xml.ftl index a472bfe..5f97369 100644 --- a/templates/activities/BlankActivity/root/res/layout/activity_simple.xml.ftl +++ b/templates/activities/BlankActivity/root/res/layout/activity_simple.xml.ftl @@ -1,5 +1,6 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" + tools:context=".${activityClass}" android:layout_width=<#if buildApi lt 8 >"fill_parent"<#else>"match_parent"</#if> android:layout_height=<#if buildApi lt 8 >"fill_parent"<#else>"match_parent"</#if> > @@ -8,7 +9,6 @@ android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" - android:text="@string/hello_world" - tools:context=".${activityClass}" /> + android:text="@string/hello_world" /> </RelativeLayout> diff --git a/templates/activities/MasterDetailFlow/root/AndroidManifest.xml.ftl b/templates/activities/MasterDetailFlow/root/AndroidManifest.xml.ftl index 15ed087..395b227 100644 --- a/templates/activities/MasterDetailFlow/root/AndroidManifest.xml.ftl +++ b/templates/activities/MasterDetailFlow/root/AndroidManifest.xml.ftl @@ -8,7 +8,7 @@ <meta-data android:name="android.support.PARENT_ACTIVITY" android:value="${parentActivityClass}" /> </#if> - <#if isLauncher> + <#if isLauncher?string == "true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> |