summaryrefslogtreecommitdiffstats
path: root/samples/browseable/AdapterTransition
diff options
context:
space:
mode:
authorTrevor Johns <trevorjohns@google.com>2014-11-12 11:39:30 -0800
committerTrevor Johns <trevorjohns@google.com>2014-11-12 11:39:30 -0800
commit527a4f30a69aaa54fc9654539f0b6d839e37af3c (patch)
tree38f816a286e672e8f00caed6a0344c3c18632a78 /samples/browseable/AdapterTransition
parentfcd28181a15ebe95724fe096a8b5198c964b0d7f (diff)
downloadandroid_development-527a4f30a69aaa54fc9654539f0b6d839e37af3c.tar.gz
android_development-527a4f30a69aaa54fc9654539f0b6d839e37af3c.tar.bz2
android_development-527a4f30a69aaa54fc9654539f0b6d839e37af3c.zip
Update browseable samples for lmp-docs
Synced to commit df5e5013422b81b4fd05c0ac9fd964b13624847a. Includes new samples for Android Auto. Change-Id: I3fec46e2a6b3f196682a92f1afd91eb682dc2dc1
Diffstat (limited to 'samples/browseable/AdapterTransition')
-rw-r--r--samples/browseable/AdapterTransition/AndroidManifest.xml4
-rw-r--r--samples/browseable/AdapterTransition/_index.jd11
-rw-r--r--samples/browseable/AdapterTransition/res/values-v21/template-styles.xml22
-rw-r--r--samples/browseable/AdapterTransition/res/values/base-strings.xml3
-rw-r--r--[-rwxr-xr-x]samples/browseable/AdapterTransition/res/values/strings.xml0
-rw-r--r--samples/browseable/AdapterTransition/src/com.example.android.adaptertransition/MainActivity.java13
6 files changed, 33 insertions, 20 deletions
diff --git a/samples/browseable/AdapterTransition/AndroidManifest.xml b/samples/browseable/AdapterTransition/AndroidManifest.xml
index 01b414d9c..a998a4c7a 100644
--- a/samples/browseable/AdapterTransition/AndroidManifest.xml
+++ b/samples/browseable/AdapterTransition/AndroidManifest.xml
@@ -19,9 +19,7 @@ limitations under the License.
android:versionCode="1"
android:versionName="1.0">
- <uses-sdk
- android:minSdkVersion="19"
- android:targetSdkVersion="19"/>
+ <!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
<application
android:allowBackup="true"
diff --git a/samples/browseable/AdapterTransition/_index.jd b/samples/browseable/AdapterTransition/_index.jd
index d5c48a392..a2d134ac5 100644
--- a/samples/browseable/AdapterTransition/_index.jd
+++ b/samples/browseable/AdapterTransition/_index.jd
@@ -1,12 +1,9 @@
-
-
-
page.tags="AdapterTransition"
sample.group=UI
@jd:body
<p>
-{@link android.transition.Transition Transition} cannot be directly applied to
-{@link android.widget.AdapterView AdapterView}s. This sample demonstrates how to
-create a overlay layout and how to run a transition on it.
-</p>
+
+ Transition cannot be directly applied to AdapterViews. In this sample, we demonstrate how to create an overlay layout and run a Transition on it. Press the action bar button to toggle between ListView and GridView.
+
+ </p>
diff --git a/samples/browseable/AdapterTransition/res/values-v21/template-styles.xml b/samples/browseable/AdapterTransition/res/values-v21/template-styles.xml
new file mode 100644
index 000000000..134fcd9d3
--- /dev/null
+++ b/samples/browseable/AdapterTransition/res/values-v21/template-styles.xml
@@ -0,0 +1,22 @@
+<!--
+ Copyright 2014 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.
+ -->
+
+<resources>
+
+ <!-- Activity themes -->
+ <style name="Theme.Base" parent="android:Theme.Material.Light" />
+
+</resources>
diff --git a/samples/browseable/AdapterTransition/res/values/base-strings.xml b/samples/browseable/AdapterTransition/res/values/base-strings.xml
index ee0c4bd59..09f86cdfe 100644
--- a/samples/browseable/AdapterTransition/res/values/base-strings.xml
+++ b/samples/browseable/AdapterTransition/res/values/base-strings.xml
@@ -14,9 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
<resources>
<string name="app_name">AdapterTransition</string>
<string name="intro_message">
diff --git a/samples/browseable/AdapterTransition/res/values/strings.xml b/samples/browseable/AdapterTransition/res/values/strings.xml
index 02b87cf79..02b87cf79 100755..100644
--- a/samples/browseable/AdapterTransition/res/values/strings.xml
+++ b/samples/browseable/AdapterTransition/res/values/strings.xml
diff --git a/samples/browseable/AdapterTransition/src/com.example.android.adaptertransition/MainActivity.java b/samples/browseable/AdapterTransition/src/com.example.android.adaptertransition/MainActivity.java
index a45632c70..0adb84284 100644
--- a/samples/browseable/AdapterTransition/src/com.example.android.adaptertransition/MainActivity.java
+++ b/samples/browseable/AdapterTransition/src/com.example.android.adaptertransition/MainActivity.java
@@ -14,9 +14,6 @@
* limitations under the License.
*/
-
-
-
package com.example.android.adaptertransition;
import android.os.Bundle;
@@ -50,10 +47,12 @@ public class MainActivity extends SampleActivityBase {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
- FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
- AdapterTransitionFragment fragment = new AdapterTransitionFragment();
- transaction.replace(R.id.sample_content_fragment, fragment);
- transaction.commit();
+ if (savedInstanceState == null) {
+ FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+ AdapterTransitionFragment fragment = new AdapterTransitionFragment();
+ transaction.replace(R.id.sample_content_fragment, fragment);
+ transaction.commit();
+ }
}
@Override