summaryrefslogtreecommitdiffstats
path: root/samples/Support4Demos
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2013-08-06 18:11:11 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-06 18:11:11 +0000
commit1cb84db2c9279dc82d9580c6c4f8542f77515c96 (patch)
treef2b8a7712cd54e8d62426d9be8fcb5d121964f7e /samples/Support4Demos
parent28a1e658c9c028fb5ab239f439cf5b28cc2fe9e9 (diff)
parentc7c384b4f6e99c69f1eb2be6cfc5693ffc803d71 (diff)
downloadandroid_development-1cb84db2c9279dc82d9580c6c4f8542f77515c96.tar.gz
android_development-1cb84db2c9279dc82d9580c6c4f8542f77515c96.tar.bz2
android_development-1cb84db2c9279dc82d9580c6c4f8542f77515c96.zip
Merge "Add RTL support in Support4Demos manifest, fix DrawerLayout sample" into jb-mr2-ub-dev
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 899b2bd78..cc98540a5 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 7fde6e11e..9949ee067 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());