Fix ExpandableList1 sample
- also increase android:targetSdkVersion to 17
Change-Id: Ibceb38f5514a7c321f75d267e40c338c0340b1ef
diff --git a/samples/ApiDemos/AndroidManifest.xml b/samples/ApiDemos/AndroidManifest.xml
index f4e77e0..ff44b0e 100644
--- a/samples/ApiDemos/AndroidManifest.xml
+++ b/samples/ApiDemos/AndroidManifest.xml
@@ -36,7 +36,7 @@
<!-- For android.media.audiofx.Visualizer -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
- <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="16" />
+ <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />
<!-- We will request access to the camera, saying we require a camera
of some sort but not one with autofocus capability. -->
diff --git a/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.java b/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.java
index bda366b..ef8c03c 100644
--- a/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.java
+++ b/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.java
@@ -118,7 +118,9 @@
// Center the text vertically
textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
// Set the text starting position
- textView.setPadding(36, 0, 0, 0);
+ textView.setPaddingRelative(36, 0, 0, 0);
+ // Set the text alignment
+ textView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
return textView;
}