summaryrefslogtreecommitdiffstats
path: root/samples/Support4Demos
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2013-08-07 13:18:49 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-07 13:18:49 -0700
commit08f1ee33a1e1cb3ebfea3cb342b2d9fb29164d1f (patch)
tree4b0b78902d4779af6078e7f7cb52a1917a88d26d /samples/Support4Demos
parent376e89d21d76cfb048ffe28bf7c88ae87e47c984 (diff)
parent19142864e826415f6be4f04a9fe125ba6d44cc54 (diff)
downloadandroid_development-08f1ee33a1e1cb3ebfea3cb342b2d9fb29164d1f.tar.gz
android_development-08f1ee33a1e1cb3ebfea3cb342b2d9fb29164d1f.tar.bz2
android_development-08f1ee33a1e1cb3ebfea3cb342b2d9fb29164d1f.zip
am 19142864: am 1cb84db2: Merge "Add RTL support in Support4Demos manifest, fix DrawerLayout sample" into jb-mr2-ub-dev
* commit '19142864e826415f6be4f04a9fe125ba6d44cc54': Add RTL support in Support4Demos manifest, fix DrawerLayout sample
Diffstat (limited to 'samples/Support4Demos')
-rw-r--r--samples/Support4Demos/AndroidManifest.xml3
-rw-r--r--samples/Support4Demos/res/layout/drawer_layout.xml14
-rw-r--r--samples/Support4Demos/res/values/strings.xml2
-rw-r--r--samples/Support4Demos/src/com/example/android/supportv4/widget/DrawerLayoutActivity.java2
4 files changed, 11 insertions, 10 deletions
diff --git a/samples/Support4Demos/AndroidManifest.xml b/samples/Support4Demos/AndroidManifest.xml
index ddf6e4eb9..ce6c29c22 100644
--- a/samples/Support4Demos/AndroidManifest.xml
+++ b/samples/Support4Demos/AndroidManifest.xml
@@ -36,7 +36,8 @@
<application android:label="@string/activity_sample_code"
android:icon="@drawable/app_sample_code"
- android:hardwareAccelerated="true">
+ android:hardwareAccelerated="true"
+ android:supportsRtl="true">
<activity android:name="Support4Demos">
<intent-filter>
diff --git a/samples/Support4Demos/res/layout/drawer_layout.xml b/samples/Support4Demos/res/layout/drawer_layout.xml
index 2ab0b1abe..375c8027a 100644
--- a/samples/Support4Demos/res/layout/drawer_layout.xml
+++ b/samples/Support4Demos/res/layout/drawer_layout.xml
@@ -37,15 +37,15 @@
android:text="@string/drawer_layout_summary"
android:textAppearance="?android:attr/textAppearanceMedium"/>
</ScrollView>
- <!-- android:layout_gravity="left" tells DrawerLayout to treat
- this as a sliding drawer on the left side. The drawer is
- given a fixed width in dp and extends the full height of
- the container. A solid background is used for contrast
- with the content view. -->
- <ListView android:id="@+id/left_drawer"
+ <!-- android:layout_gravity="start" tells DrawerLayout to treat
+ this as a sliding drawer on the starting side, which is
+ left for left-to-right locales. The drawer is given a fixed
+ width in dp and extends the full height of the container. A
+ solid background is used for contrast with the content view. -->
+ <ListView android:id="@+id/start_drawer"
android:layout_width="300dp"
android:layout_height="match_parent"
- android:layout_gravity="left"
+ android:layout_gravity="start"
android:background="#ff333333"/>
</android.support.v4.widget.DrawerLayout>
diff --git a/samples/Support4Demos/res/values/strings.xml b/samples/Support4Demos/res/values/strings.xml
index f1ff4b65f..ce41aafc7 100644
--- a/samples/Support4Demos/res/values/strings.xml
+++ b/samples/Support4Demos/res/values/strings.xml
@@ -158,7 +158,7 @@
<string name="drawer_layout_support">Widget/Drawer layout</string>
- <string name="drawer_layout_summary">This activity illustrates the use of sliding drawers. The drawer may be pulled out from the left edge with an edge swipe. If this demo is running on Ice Cream Sandwich or newer you may tap the icon at the left side of the action bar to open the drawer as well.</string>
+ <string name="drawer_layout_summary">This activity illustrates the use of sliding drawers. The drawer may be pulled out from the starting edge, which is left on left-to-right locales, with an edge swipe. If this demo is running on Ice Cream Sandwich or newer you may tap the icon at the starting side of the action bar to open the drawer as well.</string>
<string name="drawer_open">Open navigation drawer</string>
<string name="drawer_close">Close navigation drawer</string>
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/widget/DrawerLayoutActivity.java b/samples/Support4Demos/src/com/example/android/supportv4/widget/DrawerLayoutActivity.java
index ce311ccc0..7b88faa2e 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/widget/DrawerLayoutActivity.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/widget/DrawerLayoutActivity.java
@@ -83,7 +83,7 @@ public class DrawerLayoutActivity extends Activity {
setContentView(R.layout.drawer_layout);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
- mDrawer = (ListView) findViewById(R.id.left_drawer);
+ mDrawer = (ListView) findViewById(R.id.start_drawer);
mContent = (TextView) findViewById(R.id.content_text);
mDrawerLayout.setDrawerListener(new DemoDrawerListener());