Changes xml attributes to end instead of right
Change-Id: Ia1208f9de21fe0f7473377685c82ea0a2da6f548
diff --git a/res/layout/expanding_entry_card_item.xml b/res/layout/expanding_entry_card_item.xml
index c038d1b..46fc8cb 100644
--- a/res/layout/expanding_entry_card_item.xml
+++ b/res/layout/expanding_entry_card_item.xml
@@ -17,11 +17,10 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/SelectableItem"
- android:id="@+id/entry_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="@dimen/expanding_entry_card_item_padding_with_image_start"
- android:paddingRight="@dimen/expanding_entry_card_item_padding_end"
+ android:paddingStart="@dimen/expanding_entry_card_item_padding_with_image_start"
+ android:paddingEnd="@dimen/expanding_entry_card_item_padding_end"
android:paddingTop="@dimen/expanding_entry_card_item_padding_top"
android:paddingBottom="@dimen/expanding_entry_card_item_padding_bottom">
@@ -29,16 +28,16 @@
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
- android:layout_marginRight="@dimen/expanding_entry_card_item_image_spacing" />
+ android:layout_marginEnd="@dimen/expanding_entry_card_item_image_spacing" />
<TextView
android:id="@+id/header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
- android:layout_toRightOf="@+id/icon"
+ android:layout_toEndOf="@+id/icon"
android:singleLine="true"
android:textColor="@android:color/black" />
@@ -47,7 +46,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/header"
- android:layout_toRightOf="@+id/icon_sub_header"
+ android:layout_toEndOf="@+id/icon_sub_header"
android:textColor="@android:color/black" />
<ImageView
@@ -55,8 +54,8 @@
android:layout_height="wrap_content"
android:id="@+id/icon_sub_header"
android:layout_below="@+id/header"
- android:layout_toRightOf="@+id/icon"
- android:layout_marginRight="@dimen/expanding_entry_card_item_sub_header_icon_margin_right"
+ android:layout_toEndOf="@+id/icon"
+ android:layout_marginEnd="@dimen/expanding_entry_card_item_sub_header_icon_margin_right"
android:layout_marginBottom="@dimen/expanding_entry_card_item_sub_header_icon_margin_bottom" />
<TextView
@@ -64,15 +63,16 @@
android:layout_height="wrap_content"
android:id="@+id/text"
android:layout_below="@+id/sub_header"
- android:layout_toRightOf="@+id/icon_text"
+ android:layout_toEndOf="@+id/icon_text"
android:textColor="@android:color/darker_gray"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/icon_text"
- android:layout_toRightOf="@+id/icon"
+ android:layout_toEndOf="@+id/icon"
android:layout_below="@+id/sub_header"
android:layout_marginTop="@dimen/expanding_entry_card_item_text_icon_margin_top"
- android:layout_marginRight="@dimen/expanding_entry_card_item_text_icon_margin_right" />
-</RelativeLayout>
+ android:layout_marginEnd="@dimen/expanding_entry_card_item_text_icon_margin_right" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/expanding_entry_card_view.xml b/res/layout/expanding_entry_card_view.xml
index 12f96e6..8d8583d 100644
--- a/res/layout/expanding_entry_card_view.xml
+++ b/res/layout/expanding_entry_card_view.xml
@@ -17,7 +17,7 @@
<TextView
android:id="@+id/title"
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
diff --git a/res/layout/quickcontact_expanding_entry_card_button.xml b/res/layout/quickcontact_expanding_entry_card_button.xml
index 9cd34d7..2896945 100644
--- a/res/layout/quickcontact_expanding_entry_card_button.xml
+++ b/res/layout/quickcontact_expanding_entry_card_button.xml
@@ -27,12 +27,12 @@
<TextView
android:id="@+id/text"
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/expanding_entry_card_button_drawable_padding"
android:gravity="center_vertical"
android:paddingBottom="@dimen/expanding_entry_card_button_padding_vertical"
- android:paddingLeft="@dimen/expanding_entry_card_button_padding_start"
+ android:paddingStart="@dimen/expanding_entry_card_button_padding_start"
android:paddingTop="@dimen/expanding_entry_card_button_padding_vertical"
android:textColor="@color/expanding_entry_card_button_text_color" />
diff --git a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
index 51a8608..bdbe9ca 100644
--- a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
+++ b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
@@ -380,9 +380,8 @@
}
if (entry.getIntent() != null) {
- View entryLayout = view.findViewById(R.id.entry_layout);
- entryLayout.setOnClickListener(mOnClickListener);
- entryLayout.setTag(entry.getIntent());
+ view.setOnClickListener(mOnClickListener);
+ view.setTag(entry.getIntent());
}
return view;
diff --git a/src/com/android/contacts/widget/MultiShrinkScroller.java b/src/com/android/contacts/widget/MultiShrinkScroller.java
index 01cf40f..a63c9e7 100644
--- a/src/com/android/contacts/widget/MultiShrinkScroller.java
+++ b/src/com/android/contacts/widget/MultiShrinkScroller.java
@@ -642,14 +642,14 @@
if (!mEdgeGlowBottom.isFinished()) {
final int restoreCount = canvas.save();
- final int width = getWidth() - getPaddingLeft() - getPaddingRight();
+ final int width = getWidth() - getPaddingStart() - getPaddingEnd();
final int height = getHeight();
// Draw the EdgeEffect on the bottom of the Window (Or a little bit below the bottom
// of the Window if we start to scroll upwards while EdgeEffect is visible). This
// does not need to consider the case where this MultiShrinkScroller doesn't fill
// the Window, since the nested ScrollView should be set to fillViewport.
- canvas.translate(-width + getPaddingLeft(),
+ canvas.translate(-width + getPaddingStart(),
height + getMaximumScrollUpwards() - getScroll());
canvas.rotate(180, width, 0);