summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlikaid <likaid@codeaurora.org>2015-08-12 10:28:26 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-08-20 00:50:37 -0700
commitdf758ff7c7fcdf97ab4b33507959a273facd63e4 (patch)
tree2550d1d8ff9237448d0261ba6058ddbec0938fc2
parentf114b5f244648ce3b079dcbbd3e3a5148a8d47b8 (diff)
downloadandroid_packages_apps_Snap-df758ff7c7fcdf97ab4b33507959a273facd63e4.tar.gz
android_packages_apps_Snap-df758ff7c7fcdf97ab4b33507959a273facd63e4.tar.bz2
android_packages_apps_Snap-df758ff7c7fcdf97ab4b33507959a273facd63e4.zip
SnapdragonCamera: Fix submenu icon not display in RTL
Layout of submenu is not corret in RTL. Change linear layout to relative layout for this case. CRs-Fixed: 885928 Change-Id: Iaa7644cc4ccbf436cbd148a485abab2b9155ba5d
-rw-r--r--res/layout/list_sub_menu_item.xml3
-rw-r--r--res/values/styles.xml2
-rw-r--r--src/com/android/camera/ui/CheckedLinearLayout.java4
3 files changed, 6 insertions, 3 deletions
diff --git a/res/layout/list_sub_menu_item.xml b/res/layout/list_sub_menu_item.xml
index f2b043692..db417d689 100644
--- a/res/layout/list_sub_menu_item.xml
+++ b/res/layout/list_sub_menu_item.xml
@@ -36,12 +36,15 @@
android:layout_width="@dimen/setting_item_icon_width"
android:layout_height="@dimen/setting_item_icon_width"
android:layout_marginRight="@dimen/setting_item_list_margin"
+ android:layout_alignParentLeft="true"
+ android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="fitCenter" />
<TextView
android:id="@+id/text"
style="@style/CustomSettingItemTitle"
+ android:layout_toRightOf="@+id/image"
android:shadowColor="@android:color/transparent"
android:shadowDx="1"
android:shadowDy="1"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index bd971d5a2..92c6d9928 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -85,7 +85,7 @@
<item name="android:gravity">left|center_vertical</item>
<item name="android:singleLine">true</item>
<item name="android:layout_weight">1</item>
- <item name="android:layout_width">0dp</item>
+ <item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
</style>
<style name="SettingItemTitle">
diff --git a/src/com/android/camera/ui/CheckedLinearLayout.java b/src/com/android/camera/ui/CheckedLinearLayout.java
index 4e7750499..2acfd8b09 100644
--- a/src/com/android/camera/ui/CheckedLinearLayout.java
+++ b/src/com/android/camera/ui/CheckedLinearLayout.java
@@ -19,9 +19,9 @@ package com.android.camera.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.Checkable;
-import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
-public class CheckedLinearLayout extends LinearLayout implements Checkable {
+public class CheckedLinearLayout extends RelativeLayout implements Checkable {
private static final int[] CHECKED_STATE_SET = {
android.R.attr.state_checked
};