Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/124364

Change subject: List layout for settings language selector is v11 again, have 
to duplicate it
......................................................................

List layout for settings language selector is v11 again, have to duplicate it

There's an odd bug on my Nexus 1 where the background shows black except when
scrolling. Don't know what's up with that yet.

Change-Id: Iee5cffc1e92cecc3dbab9f66d54bd36df2b15de9
---
A wikipedia/res/layout-v17/simple_list_item_activated_2.xml
A wikipedia/res/layout/simple_list_item_activated_2.xml
M wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java
3 files changed, 87 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/64/124364/1

diff --git a/wikipedia/res/layout-v17/simple_list_item_activated_2.xml 
b/wikipedia/res/layout-v17/simple_list_item_activated_2.xml
new file mode 100644
index 0000000..d7d64d5
--- /dev/null
+++ b/wikipedia/res/layout-v17/simple_list_item_activated_2.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android";
+                 android:paddingTop="2dip"
+                 android:paddingBottom="2dip"
+                 android:layout_width="match_parent"
+                 android:layout_height="wrap_content"
+                 
android:background="?android:attr/activatedBackgroundIndicator"
+                 android:minHeight="?android:attr/listPreferredItemHeight"
+                 android:mode="twoLine"
+        >
+
+    <TextView android:id="@android:id/text1"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
+              android:layout_marginTop="6dip"
+              android:textAppearance="?android:attr/textAppearanceListItem"
+            />
+
+    <TextView android:id="@android:id/text2"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:layout_below="@android:id/text1"
+              android:layout_alignStart="@android:id/text1"
+              android:textAppearance="?android:attr/textAppearanceSmall"
+            />
+
+</TwoLineListItem>
diff --git a/wikipedia/res/layout/simple_list_item_activated_2.xml 
b/wikipedia/res/layout/simple_list_item_activated_2.xml
new file mode 100644
index 0000000..d8c805c
--- /dev/null
+++ b/wikipedia/res/layout/simple_list_item_activated_2.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android";
+                 android:paddingTop="2dip"
+                 android:paddingBottom="2dip"
+                 android:layout_width="match_parent"
+                 android:layout_height="wrap_content"
+                 android:background="@drawable/activated_background_holo_light"
+                 android:minHeight="?android:attr/listPreferredItemHeight"
+                 android:mode="twoLine"
+        >
+
+    <TextView android:id="@android:id/text1"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:layout_marginStart="6dip"
+              android:layout_marginTop="6dip"
+              android:textAppearance="?android:attr/textAppearanceLarge"
+            />
+
+    <TextView android:id="@android:id/text2"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:layout_below="@android:id/text1"
+              android:layout_alignStart="@android:id/text1"
+              android:textAppearance="?android:attr/textAppearanceSmall"
+            />
+
+</TwoLineListItem>
diff --git 
a/wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java 
b/wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java
index 86b1c1d..c21c278 100644
--- a/wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java
+++ b/wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java
@@ -117,7 +117,7 @@
         @Override
         public View getView(int position, View convertView, ViewGroup parent) {
             if (convertView == null) {
-                convertView = 
LayoutInflater.from(parent.getContext()).inflate(android.R.layout.simple_list_item_activated_2,
 parent, false);
+                convertView = 
LayoutInflater.from(parent.getContext()).inflate(R.layout.simple_list_item_activated_2,
 parent, false);
             }
 
             TextView nameText = (TextView) 
convertView.findViewById(android.R.id.text1);

-- 
To view, visit https://gerrit.wikimedia.org/r/124364
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee5cffc1e92cecc3dbab9f66d54bd36df2b15de9
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER <br...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to