Fix location chip and description RTL issue

pull/848/head
Alex Baker 5 years ago
parent 9045b8bfa2
commit 2c60d25634

@ -146,9 +146,8 @@ public class ViewHolder extends RecyclerView.ViewHolder {
dueDate.setTextSize(fontSizeDetails);
if (atLeastJellybeanMR1()) {
int direction = locale.isRtl() ? View.LAYOUT_DIRECTION_LTR : View.LAYOUT_DIRECTION_RTL;
chipGroup.setLayoutDirection(direction);
locationChip.setLayoutDirection(direction);
chipGroup.setLayoutDirection(
locale.isRtl() ? View.LAYOUT_DIRECTION_LTR : View.LAYOUT_DIRECTION_RTL);
} else {
MarginLayoutParams lp = (MarginLayoutParams) chipGroup.getLayoutParams();
lp.setMargins(lp.rightMargin, lp.topMargin, lp.leftMargin, lp.bottomMargin);

@ -85,6 +85,8 @@
android:paddingEnd="@dimen/keyline_first"
android:paddingLeft="@dimen/keyline_content_inset"
android:paddingRight="@dimen/keyline_first"
android:gravity="start"
android:textAlignment="viewStart"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/text_secondary"
@ -99,7 +101,7 @@
android:layout_marginLeft="@dimen/keyline_content_inset"
android:layout_marginRight="@dimen/keyline_first"
android:layout_gravity="center_vertical|end"
android:textAlignment="center"
android:gravity="end"
android:textColor="@color/text_secondary"
android:visibility="gone"
app:chipBackgroundColor="?attr/asContentBackground"

Loading…
Cancel
Save