diff options
author | Skuhne <skuhne@google.com> | 2015-03-26 02:56:46 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-26 02:56:47 +0000 |
commit | 4976d6b52588772117dff43fb814fe6661bfe598 (patch) | |
tree | 0df2fce8989c78d6c4577437e9e6d0bf8318146d | |
parent | 9c66583379f4cd296da8c83f2c18dfb29df72861 (diff) | |
parent | b9026ff592ac781bc12a042cf6451dd927be6dd5 (diff) | |
download | frameworks_base-4976d6b52588772117dff43fb814fe6661bfe598.zip frameworks_base-4976d6b52588772117dff43fb814fe6661bfe598.tar.gz frameworks_base-4976d6b52588772117dff43fb814fe6661bfe598.tar.bz2 |
Merge "Fixing layout button in caption and adding quarter functionality"
-rw-r--r-- | packages/SystemUI/res/drawable/vector_drawable_place_bottom_left.xml | 24 | ||||
-rw-r--r-- | packages/SystemUI/res/drawable/vector_drawable_place_bottom_right.xml | 24 | ||||
-rw-r--r-- | packages/SystemUI/res/drawable/vector_drawable_place_top_left.xml | 24 | ||||
-rw-r--r-- | packages/SystemUI/res/drawable/vector_drawable_place_top_right.xml | 24 | ||||
-rw-r--r-- | packages/SystemUI/res/layout-land/recents_task_resize_dialog.xml (renamed from packages/SystemUI/res/layout/recents_task_resize_dialog.xml) | 14 | ||||
-rw-r--r-- | packages/SystemUI/res/layout-port/recents_task_resize_dialog.xml | 51 | ||||
-rw-r--r-- | packages/SystemUI/res/layout-sw600dp/recents_task_resize_dialog.xml | 93 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java | 173 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java | 16 |
9 files changed, 370 insertions, 73 deletions
diff --git a/packages/SystemUI/res/drawable/vector_drawable_place_bottom_left.xml b/packages/SystemUI/res/drawable/vector_drawable_place_bottom_left.xml new file mode 100644 index 0000000..cea6324 --- /dev/null +++ b/packages/SystemUI/res/drawable/vector_drawable_place_bottom_left.xml @@ -0,0 +1,24 @@ +<!-- +Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24.0dp" + android:height="24.0dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M24.0,24.0L24.0,0.0L0.0,0.0l0.0,24.0L24.0,24.0zM4.0,10.0l10.0,0.0l0.0,10.0L4.0,20.0L4.0,10.0z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/vector_drawable_place_bottom_right.xml b/packages/SystemUI/res/drawable/vector_drawable_place_bottom_right.xml new file mode 100644 index 0000000..c2ae9c8 --- /dev/null +++ b/packages/SystemUI/res/drawable/vector_drawable_place_bottom_right.xml @@ -0,0 +1,24 @@ +<!-- +Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24.0dp" + android:height="24.0dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M24.0,24.0L24.0,0.0L0.0,0.0l0.0,24.0L24.0,24.0zM20.0,20.0L10.0,20.0L10.0,10.0l10.0,0.0L20.0,20.0z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/vector_drawable_place_top_left.xml b/packages/SystemUI/res/drawable/vector_drawable_place_top_left.xml new file mode 100644 index 0000000..feb612c --- /dev/null +++ b/packages/SystemUI/res/drawable/vector_drawable_place_top_left.xml @@ -0,0 +1,24 @@ +<!-- +Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24.0dp" + android:height="24.0dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M0.0,0.0l0.0,24.0l24.0,0.0L24.0,0.0L0.0,0.0zM4.0,4.0l10.0,0.0l0.0,10.0L4.0,14.0L4.0,4.0z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/vector_drawable_place_top_right.xml b/packages/SystemUI/res/drawable/vector_drawable_place_top_right.xml new file mode 100644 index 0000000..9f4ee49 --- /dev/null +++ b/packages/SystemUI/res/drawable/vector_drawable_place_top_right.xml @@ -0,0 +1,24 @@ +<!-- +Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24.0dp" + android:height="24.0dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M0.0,0.0l0.0,24.0l24.0,0.0L24.0,0.0L0.0,0.0zM20.0,14.0L10.0,14.0L10.0,4.0l10.0,0.0L20.0,14.0z"/> +</vector> diff --git a/packages/SystemUI/res/layout/recents_task_resize_dialog.xml b/packages/SystemUI/res/layout-land/recents_task_resize_dialog.xml index a8c6ee9..a718d4d 100644 --- a/packages/SystemUI/res/layout/recents_task_resize_dialog.xml +++ b/packages/SystemUI/res/layout-land/recents_task_resize_dialog.xml @@ -41,20 +41,6 @@ android:layout_margin="10dp" android:background="@drawable/vector_drawable_place_right" /> <Button - android:id="@+id/place_top" - android:layout_width="36dp" - android:layout_height="36dp" - android:layout_weight="1" - android:layout_margin="10dp" - android:background="@drawable/vector_drawable_place_top" /> - <Button - android:id="@+id/place_bottom" - android:layout_width="36dp" - android:layout_height="36dp" - android:layout_weight="1" - android:layout_margin="10dp" - android:background="@drawable/vector_drawable_place_bottom" /> - <Button android:id="@+id/place_full" android:layout_width="36dp" android:layout_height="36dp" diff --git a/packages/SystemUI/res/layout-port/recents_task_resize_dialog.xml b/packages/SystemUI/res/layout-port/recents_task_resize_dialog.xml new file mode 100644 index 0000000..250f53d --- /dev/null +++ b/packages/SystemUI/res/layout-port/recents_task_resize_dialog.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="16dp" + android:orientation="vertical" + android:descendantFocusability="beforeDescendants" + android:focusableInTouchMode="true"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + <Button + android:id="@+id/place_top" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_top" /> + <Button + android:id="@+id/place_bottom" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_bottom" /> + <Button + android:id="@+id/place_full" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_fullscreen" /> + </LinearLayout> +</LinearLayout>
\ No newline at end of file diff --git a/packages/SystemUI/res/layout-sw600dp/recents_task_resize_dialog.xml b/packages/SystemUI/res/layout-sw600dp/recents_task_resize_dialog.xml new file mode 100644 index 0000000..29e4bce --- /dev/null +++ b/packages/SystemUI/res/layout-sw600dp/recents_task_resize_dialog.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="16dp" + android:orientation="vertical" + android:descendantFocusability="beforeDescendants" + android:focusableInTouchMode="true"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + <Button + android:id="@+id/place_left" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_left" /> + <Button + android:id="@+id/place_right" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_right" /> + <Button + android:id="@+id/place_top" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_top" /> + <Button + android:id="@+id/place_bottom" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_bottom" /> + <Button + android:id="@+id/place_top_left" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_top_left" /> + <Button + android:id="@+id/place_top_right" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_top_right" /> + <Button + android:id="@+id/place_bottom_left" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_bottom_left" /> + <Button + android:id="@+id/place_bottom_right" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_bottom_right" /> + <Button + android:id="@+id/place_full" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_weight="1" + android:layout_margin="10dp" + android:background="@drawable/vector_drawable_place_fullscreen" /> + </LinearLayout> +</LinearLayout>
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java index 7c11894..4cd577d 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java @@ -24,6 +24,7 @@ import android.content.Context; import android.content.DialogInterface; import android.graphics.Rect; import android.os.Bundle; +import android.util.Pair; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; @@ -34,6 +35,8 @@ import com.android.systemui.recents.model.Task; import com.android.systemui.recents.RecentsActivity; import com.android.systemui.recents.views.RecentsView; +import java.util.ArrayList; + /** * A helper for the dialogs that show when task debugging is on. */ @@ -46,16 +49,32 @@ public class RecentsResizeTaskDialog extends DialogFragment { private static final int PLACE_RIGHT = 2; private static final int PLACE_TOP = 3; private static final int PLACE_BOTTOM = 4; - private static final int PLACE_FULL = 5; + private static final int PLACE_TOP_LEFT = 5; + private static final int PLACE_TOP_RIGHT = 6; + private static final int PLACE_BOTTOM_LEFT = 7; + private static final int PLACE_BOTTOM_RIGHT = 8; + private static final int PLACE_FULL = 9; + + // The button resource ID combined with the arrangement command. + private static final int[][] BUTTON_DEFINITIONS = + {{R.id.place_left, PLACE_LEFT}, + {R.id.place_right, PLACE_RIGHT}, + {R.id.place_top, PLACE_TOP}, + {R.id.place_bottom, PLACE_BOTTOM}, + {R.id.place_top_left, PLACE_TOP_LEFT}, + {R.id.place_top_right, PLACE_TOP_RIGHT}, + {R.id.place_bottom_left, PLACE_BOTTOM_LEFT}, + {R.id.place_bottom_right, PLACE_BOTTOM_RIGHT}, + {R.id.place_full, PLACE_FULL}}; // The task we want to resize. - private Task mTaskToResize; - private Task mNextTaskToResize; private FragmentManager mFragmentManager; private View mResizeTaskDialogContent; private RecentsActivity mRecentsActivity; private RecentsView mRecentsView; private SystemServicesProxy mSsp; + private Rect[] mBounds = {new Rect(), new Rect(), new Rect(), new Rect()}; + private Task[] mTasks = {null, null, null, null}; public RecentsResizeTaskDialog(FragmentManager mgr, RecentsActivity activity) { mFragmentManager = mgr; @@ -65,9 +84,8 @@ public class RecentsResizeTaskDialog extends DialogFragment { /** Shows the resize-task dialog. */ void showResizeTaskDialog(Task mainTask, RecentsView rv) { - mTaskToResize = mainTask; + mTasks[0] = mainTask; mRecentsView = rv; - mNextTaskToResize = mRecentsView.getNextTaskOrTopTask(mainTask); show(mFragmentManager, TAG); } @@ -79,36 +97,18 @@ public class RecentsResizeTaskDialog extends DialogFragment { mResizeTaskDialogContent = inflater.inflate(R.layout.recents_task_resize_dialog, null, false); - ((Button)mResizeTaskDialogContent.findViewById(R.id.place_left)).setOnClickListener( - new View.OnClickListener() { - public void onClick(View v) { - placeTasks(PLACE_LEFT); - } - }); - ((Button)mResizeTaskDialogContent.findViewById(R.id.place_right)).setOnClickListener( - new View.OnClickListener() { - public void onClick(View v) { - placeTasks(PLACE_RIGHT); - } - }); - ((Button)mResizeTaskDialogContent.findViewById(R.id.place_top)).setOnClickListener( - new View.OnClickListener() { - public void onClick(View v) { - placeTasks(PLACE_TOP); - } - }); - ((Button)mResizeTaskDialogContent.findViewById(R.id.place_bottom)).setOnClickListener( - new View.OnClickListener() { - public void onClick(View v) { - placeTasks(PLACE_BOTTOM); - } - }); - ((Button)mResizeTaskDialogContent.findViewById(R.id.place_full)).setOnClickListener( - new View.OnClickListener() { - public void onClick(View v) { - placeTasks(PLACE_FULL); + for (int i = 0; i < BUTTON_DEFINITIONS.length; i++) { + Button b = (Button)mResizeTaskDialogContent.findViewById(BUTTON_DEFINITIONS[i][0]); + if (b != null) { + final int action = BUTTON_DEFINITIONS[i][1]; + b.setOnClickListener( + new View.OnClickListener() { + public void onClick(View v) { + placeTasks(action); + } + }); } - }); + } builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override @@ -122,48 +122,111 @@ public class RecentsResizeTaskDialog extends DialogFragment { /** Helper function to place window(s) on the display according to an arrangement request. */ private void placeTasks(int arrangement) { - Rect focusedBounds = mSsp.getWindowRect(); - Rect otherBounds = new Rect(focusedBounds); - + Rect rect = mSsp.getWindowRect(); + for (int i = 0; i < mBounds.length; ++i) { + mBounds[i].set(rect); + if (i != 0) { + mTasks[i] = null; + } + } + int additionalTasks = 0; switch (arrangement) { case PLACE_LEFT: - focusedBounds.right = focusedBounds.centerX(); - otherBounds.left = focusedBounds.right; + mBounds[0].right = mBounds[0].centerX(); + mBounds[1].left = mBounds[0].right; + additionalTasks = 1; break; case PLACE_RIGHT: - otherBounds.right = otherBounds.centerX(); - focusedBounds.left = otherBounds.right; + mBounds[1].right = mBounds[1].centerX(); + mBounds[0].left = mBounds[1].right; + additionalTasks = 1; break; case PLACE_TOP: - focusedBounds.bottom = focusedBounds.centerY(); - otherBounds.top = focusedBounds.bottom; + mBounds[0].bottom = mBounds[0].centerY(); + mBounds[1].top = mBounds[0].bottom; + additionalTasks = 1; break; case PLACE_BOTTOM: - otherBounds.bottom = otherBounds.centerY(); - focusedBounds.top = otherBounds.bottom; + mBounds[1].bottom = mBounds[1].centerY(); + mBounds[0].top = mBounds[1].bottom; + additionalTasks = 1; + break; + case PLACE_TOP_LEFT: // TL, TR, BL, BR + mBounds[0].right = mBounds[0].centerX(); + mBounds[0].bottom = mBounds[0].centerY(); + mBounds[1].left = mBounds[0].right; + mBounds[1].bottom = mBounds[0].bottom; + mBounds[2].right = mBounds[0].right; + mBounds[2].top = mBounds[0].bottom; + mBounds[3].left = mBounds[0].right; + mBounds[3].top = mBounds[0].bottom; + additionalTasks = 3; + break; + case PLACE_TOP_RIGHT: // TR, TL, BR, BL + mBounds[0].left = mBounds[0].centerX(); + mBounds[0].bottom = mBounds[0].centerY(); + mBounds[1].right = mBounds[0].left; + mBounds[1].bottom = mBounds[0].bottom; + mBounds[2].left = mBounds[0].left; + mBounds[2].top = mBounds[0].bottom; + mBounds[3].right = mBounds[0].left; + mBounds[3].top = mBounds[0].bottom; + additionalTasks = 3; + break; + case PLACE_BOTTOM_LEFT: // BL, BR, TL, TR + mBounds[0].right = mBounds[0].centerX(); + mBounds[0].top = mBounds[0].centerY(); + mBounds[1].left = mBounds[0].right; + mBounds[1].top = mBounds[0].top; + mBounds[2].right = mBounds[0].right; + mBounds[2].bottom = mBounds[0].top; + mBounds[3].left = mBounds[0].right; + mBounds[3].bottom = mBounds[0].top; + additionalTasks = 3; + break; + case PLACE_BOTTOM_RIGHT: // BR, BL, TR, TL + mBounds[0].left = mBounds[0].centerX(); + mBounds[0].top = mBounds[0].centerY(); + mBounds[1].right = mBounds[0].left; + mBounds[1].top = mBounds[0].top; + mBounds[2].left = mBounds[0].left; + mBounds[2].bottom = mBounds[0].top; + mBounds[3].right = mBounds[0].left; + mBounds[3].bottom = mBounds[0].top; + additionalTasks = 3; break; case PLACE_FULL: - // Null the rectangle to avoid the other task to show up. - otherBounds = new Rect(); + // Nothing to change. break; } - // Resize all other tasks to go to the other side. - if (mNextTaskToResize != null && !otherBounds.isEmpty()) { - mSsp.resizeTask(mNextTaskToResize.key.id, otherBounds); + // Get the other tasks. + for (int i = 1; i <= additionalTasks && mTasks[i - 1] != null; ++i) { + mTasks[i] = mRecentsView.getNextTaskOrTopTask(mTasks[i - 1]); + // Do stop if we circled back to the first item. + if (mTasks[i] == mTasks[0]) { + mTasks[i] = null; + } + } + + // Resize all tasks beginning from the "oldest" one. + for (int i = additionalTasks; i >= 0; --i) { + if (mTasks[i] != null) { + mSsp.resizeTask(mTasks[i].key.id, mBounds[i]); + } } - mSsp.resizeTask(mTaskToResize.key.id, focusedBounds); // Get rid of the dialog. dismiss(); mRecentsActivity.dismissRecentsToHomeRaw(false); - // Show tasks - beginning with the other first so that the focus ends on the selected one. + // Show tasks - beginning with the oldest so that the focus ends on the selected one. // TODO: Remove this once issue b/19893373 is resolved. - if (mNextTaskToResize != null && !otherBounds.isEmpty()) { - mRecentsView.launchTask(mNextTaskToResize); + for (int i = additionalTasks; i >= 0; --i) { + if (mTasks[i] != null) { + mRecentsView.launchTask(mTasks[i]); + } } - mRecentsView.launchTask(mTaskToResize); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java index 42399a3..eb26253 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java @@ -191,10 +191,7 @@ public class TaskViewHeader extends FrameLayout { mApplicationIcon.setImageDrawable(t.applicationIcon); } mApplicationIcon.setContentDescription(t.activityLabel); - // Always update when multi stack debugging is enabled as the stack id can change - if (mConfig.multiStackEnabled) { - mActivityDescription.setText("[" + t.key.stackId + "] " + t.activityLabel); - } else if (!mActivityDescription.getText().toString().equals(t.activityLabel)) { + if (!mActivityDescription.getText().toString().equals(t.activityLabel)) { mActivityDescription.setText(t.activityLabel); } // Try and apply the system ui tint @@ -212,6 +209,9 @@ public class TaskViewHeader extends FrameLayout { mDismissButton.setContentDescription(String.format(mDismissContentDescription, t.activityLabel)); mMoveTaskButton.setVisibility((mConfig.multiStackEnabled) ? View.VISIBLE : View.INVISIBLE); + if (mConfig.multiStackEnabled) { + updateResizeTaskBarIcon(t); + } } /** Updates the resize task bar button. */ @@ -234,6 +234,14 @@ public class TaskViewHeader extends FrameLayout { resId = R.drawable.vector_drawable_place_top; } else if (bottom && left && right) { resId = R.drawable.vector_drawable_place_bottom; + } else if (top && right) { + resId = R.drawable.vector_drawable_place_top_right; + } else if (top && left) { + resId = R.drawable.vector_drawable_place_top_left; + } else if (bottom && right) { + resId = R.drawable.vector_drawable_place_bottom_right; + } else if (bottom && left) { + resId = R.drawable.vector_drawable_place_bottom_left; } } mMoveTaskButton.setImageResource(resId); |