Merge "[Overview Actions] Let RecentsView child match system LTR setting." into ub-launcher3-master

This commit is contained in:
Becky Qiu authored and Android (Google) Code Review committed 2020-01-25 23:00:12 +00:00
commit 01f0964129
1 file changed
+5
@@ -1918,6 +1918,11 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
@Override
public void addView(View child, int index) {
// RecentsView is set to RTL in the constructor when system is using LTR. Here we set the
// child direction back to match system settings.
child.setLayoutDirection(
Utilities.isRtl(getResources())
? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR);
super.addView(child, index);
if (isExtraCardView(child, index)) {
mTaskViewStartIndex++;