Fixing RTL issues with transition and screen pinning.

am: 96f78f5046

Change-Id: Id492a30f4a76a2a008d169496e65036ce8828134
This commit is contained in:
Winson
2016-09-22 22:43:56 +00:00
committed by android-build-merger
2 changed files with 11 additions and 2 deletions

View File

@@ -30,8 +30,8 @@
android:id="@+id/lock_to_app_fab" android:id="@+id/lock_to_app_fab"
android:layout_width="@dimen/recents_lock_to_app_size" android:layout_width="@dimen/recents_lock_to_app_size"
android:layout_height="@dimen/recents_lock_to_app_size" android:layout_height="@dimen/recents_lock_to_app_size"
android:layout_gravity="bottom|right" android:layout_gravity="bottom|end"
android:layout_marginRight="15dp" android:layout_marginEnd="15dp"
android:layout_marginBottom="15dp" android:layout_marginBottom="15dp"
android:translationZ="4dp" android:translationZ="4dp"
android:contentDescription="@string/recents_lock_to_app_button_label" android:contentDescription="@string/recents_lock_to_app_button_label"

View File

@@ -205,9 +205,17 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
} }
public void onConfigurationChanged() { public void onConfigurationChanged() {
Resources res = mContext.getResources();
reloadResources(); reloadResources();
mDummyStackView.reloadOnConfigurationChange(); mDummyStackView.reloadOnConfigurationChange();
// Update the header bar direction directly as it is not attached to anything and does not
// layout except in updateHeaderBarLayout()
mHeaderBar.setLayoutDirection(res.getConfiguration().getLayoutDirection());
mHeaderBar.onConfigurationChanged(); mHeaderBar.onConfigurationChanged();
mHeaderBar.forceLayout();
mHeaderBar.measure(
MeasureSpec.makeMeasureSpec(mHeaderBar.getMeasuredWidth(), MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(mHeaderBar.getMeasuredHeight(), MeasureSpec.EXACTLY));
} }
/** /**
@@ -626,6 +634,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
synchronized (mHeaderBarLock) { synchronized (mHeaderBarLock) {
if (mHeaderBar.getMeasuredWidth() != taskViewWidth || if (mHeaderBar.getMeasuredWidth() != taskViewWidth ||
mHeaderBar.getMeasuredHeight() != mTaskBarHeight) { mHeaderBar.getMeasuredHeight() != mTaskBarHeight) {
mHeaderBar.forceLayout();
mHeaderBar.measure( mHeaderBar.measure(
MeasureSpec.makeMeasureSpec(taskViewWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(taskViewWidth, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(mTaskBarHeight, MeasureSpec.EXACTLY)); MeasureSpec.makeMeasureSpec(mTaskBarHeight, MeasureSpec.EXACTLY));