Tabletizing SimpleView template
Based off of changes to SingleView in commit 036c8a0354.
Change-Id: Id14d7938ac2359878e6283497b5d8c76ab8feab9
diff --git a/templates/SimpleView/_MODULE_/src/template/java/_PACKAGE_/MainActivity.java.ftl b/templates/SimpleView/_MODULE_/src/template/java/_PACKAGE_/MainActivity.java.ftl
index 0d6e684..7e4378e 100644
--- a/templates/SimpleView/_MODULE_/src/template/java/_PACKAGE_/MainActivity.java.ftl
+++ b/templates/SimpleView/_MODULE_/src/template/java/_PACKAGE_/MainActivity.java.ftl
@@ -17,6 +17,7 @@
package ${sample.package};
+import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.view.Menu;
@@ -70,6 +71,8 @@
LogFragment logFragment = (LogFragment) getSupportFragmentManager()
.findFragmentById(R.id.log_fragment);
msgFilter.setNext(logFragment.getLogView());
+ logFragment.getLogView().setTextAppearance(this, R.style.Log);
+ logFragment.getLogView().setBackgroundColor(Color.WHITE);
Log.i(TAG, "Ready");
}
diff --git a/templates/SimpleView/_MODULE_/src/template/res/layout-sw600dp-land/activity_main.xml b/templates/SimpleView/_MODULE_/src/template/res/layout-sw600dp-land/activity_main.xml
new file mode 100644
index 0000000..653454b
--- /dev/null
+++ b/templates/SimpleView/_MODULE_/src/template/res/layout-sw600dp-land/activity_main.xml
@@ -0,0 +1,37 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:id="@+id/sample_main_layout">
+ <TextView android:id="@+id/sample_output"
+ style="@style/Widget.SampleMessage"
+ android:background="@android:color/white"
+ android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="@string/intro_message"
+ android:layout_margin="16dp" />
+ <fragment
+ android:name="com.example.android.common.logger.LogFragment"
+ android:id="@+id/log_fragment"
+ android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="16dp" />
+</LinearLayout>
diff --git a/templates/SimpleView/_MODULE_/src/template/res/layout-sw600dp/activity_main.xml b/templates/SimpleView/_MODULE_/src/template/res/layout-sw600dp/activity_main.xml
new file mode 100644
index 0000000..11cd71b
--- /dev/null
+++ b/templates/SimpleView/_MODULE_/src/template/res/layout-sw600dp/activity_main.xml
@@ -0,0 +1,36 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:id="@+id/sample_main_layout">
+ <TextView android:id="@+id/sample_output"
+ style="@style/Widget.SampleMessage"
+ android:background="@android:color/white"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/intro_message"
+ android:padding="16dp"
+ android:layout_margin="16dp"/>
+ <fragment
+ android:name="com.example.android.common.logger.LogFragment"
+ android:id="@+id/log_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="16dp" />
+</LinearLayout>
diff --git a/templates/SimpleView/_MODULE_/src/template/res/layout/activity_main.xml b/templates/SimpleView/_MODULE_/src/template/res/layout/activity_main.xml
index bc5a575..6f41369 100644
--- a/templates/SimpleView/_MODULE_/src/template/res/layout/activity_main.xml
+++ b/templates/SimpleView/_MODULE_/src/template/res/layout/activity_main.xml
@@ -24,7 +24,8 @@
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:text="@string/intro_message" />
+ android:text="@string/intro_message"
+ android:padding="16dp" />
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
diff --git a/templates/SimpleView/_MODULE_/src/template/res/values/template-styles.xml b/templates/SimpleView/_MODULE_/src/template/res/values/template-styles.xml
index d3f82ff..cfffcbd 100644
--- a/templates/SimpleView/_MODULE_/src/template/res/values/template-styles.xml
+++ b/templates/SimpleView/_MODULE_/src/template/res/values/template-styles.xml
@@ -26,8 +26,11 @@
<style name="Widget" />
<style name="Widget.SampleMessage">
+ <item name="android:padding">@dimen/margin_medium</item>
<item name="android:textAppearance">?android:textAppearanceMedium</item>
<item name="android:lineSpacingMultiplier">1.1</item>
+ <item name="android:layout_margin">16dp</item>
+ <item name="android:shadowDy">-6.5</item>
</style>
<style name="Widget.SampleMessageTile">