From b77d9934abf6a87e655337027edb82fd0a7d3031 Mon Sep 17 00:00:00 2001 From: Vavassor Date: Wed, 12 Jul 2017 17:03:32 -0400 Subject: [PATCH] Fixes some odd spacing in right-to-left direction and sets some icons to auto-mirror. --- .../java/com/keylesspalace/tusky/view/FlowLayout.java | 7 ++++--- app/src/main/res/drawable/ic_play_48dp.xml | 3 ++- app/src/main/res/drawable/ic_reply_24dp.xml | 3 ++- app/src/main/res/drawable/ic_send_24dp.xml | 3 ++- app/src/main/res/layout/item_follow.xml | 2 +- app/src/main/res/layout/item_status.xml | 9 ++++----- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/view/FlowLayout.java b/app/src/main/java/com/keylesspalace/tusky/view/FlowLayout.java index 236aa2ec..be7c144f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/FlowLayout.java +++ b/app/src/main/java/com/keylesspalace/tusky/view/FlowLayout.java @@ -64,16 +64,17 @@ public class FlowLayout extends ViewGroup { if (child.getVisibility() != GONE) { int widthSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST); child.measure(widthSpec, childHeightMeasureSpec); - int childwidth = child.getMeasuredWidth(); + child.getLayoutParams(); + int childWidth = child.getMeasuredWidth(); int childHeight = child.getMeasuredHeight(); - if (x + childwidth > width) { + if (x + childWidth > width) { x = getPaddingLeft(); y += rowHeight; rowHeight = childHeight + paddingVertical; } else { rowHeight = Math.max(rowHeight, childHeight + paddingVertical); } - x += childwidth + paddingHorizontal; + x += childWidth + paddingHorizontal; } } if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.UNSPECIFIED) { diff --git a/app/src/main/res/drawable/ic_play_48dp.xml b/app/src/main/res/drawable/ic_play_48dp.xml index fd6fee0c..a0275bfa 100644 --- a/app/src/main/res/drawable/ic_play_48dp.xml +++ b/app/src/main/res/drawable/ic_play_48dp.xml @@ -3,6 +3,7 @@ android:height="48dp" android:width="48dp" android:viewportWidth="24" - android:viewportHeight="24"> + android:viewportHeight="24" + android:autoMirrored="true"> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_reply_24dp.xml b/app/src/main/res/drawable/ic_reply_24dp.xml index 5fcea57d..c9602ca5 100644 --- a/app/src/main/res/drawable/ic_reply_24dp.xml +++ b/app/src/main/res/drawable/ic_reply_24dp.xml @@ -2,7 +2,8 @@ android:width="24dp" android:height="24dp" android:viewportWidth="24.0" - android:viewportHeight="24.0"> + android:viewportHeight="24.0" + android:autoMirrored="true"> diff --git a/app/src/main/res/drawable/ic_send_24dp.xml b/app/src/main/res/drawable/ic_send_24dp.xml index c98a573e..b5704ce0 100644 --- a/app/src/main/res/drawable/ic_send_24dp.xml +++ b/app/src/main/res/drawable/ic_send_24dp.xml @@ -2,7 +2,8 @@ android:width="24dp" android:height="24dp" android:viewportWidth="24.0" - android:viewportHeight="24.0"> + android:viewportHeight="24.0" + android:autoMirrored="true"> diff --git a/app/src/main/res/layout/item_follow.xml b/app/src/main/res/layout/item_follow.xml index 7347012f..cceb601b 100644 --- a/app/src/main/res/layout/item_follow.xml +++ b/app/src/main/res/layout/item_follow.xml @@ -31,7 +31,7 @@ @@ -117,6 +119,7 @@ android:layout_toEndOf="@+id/status_avatar" android:layout_below="@+id/status_name_bar" android:layout_marginBottom="4dp" + app:paddingHorizontal="4dp" android:focusable="true"> + android:textColor="?android:textColorPrimary" />