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); dueDate.setTextSize(fontSizeDetails);
if (atLeastJellybeanMR1()) { if (atLeastJellybeanMR1()) {
int direction = locale.isRtl() ? View.LAYOUT_DIRECTION_LTR : View.LAYOUT_DIRECTION_RTL; chipGroup.setLayoutDirection(
chipGroup.setLayoutDirection(direction); locale.isRtl() ? View.LAYOUT_DIRECTION_LTR : View.LAYOUT_DIRECTION_RTL);
locationChip.setLayoutDirection(direction);
} else { } else {
MarginLayoutParams lp = (MarginLayoutParams) chipGroup.getLayoutParams(); MarginLayoutParams lp = (MarginLayoutParams) chipGroup.getLayoutParams();
lp.setMargins(lp.rightMargin, lp.topMargin, lp.leftMargin, lp.bottomMargin); lp.setMargins(lp.rightMargin, lp.topMargin, lp.leftMargin, lp.bottomMargin);

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

Loading…
Cancel
Save