From dbedb91ad83c93f4998d1f71b5c1ef926d416c6c Mon Sep 17 00:00:00 2001 From: Sreyas Date: Sat, 23 May 2020 16:02:44 -0700 Subject: [PATCH] Putting Overview Share button behind flag https://drive.google.com/file/d/1Io5N-LyXoRa9LHQjJNd1BAgBkVuBvnhr/view?usp=sharing https://drive.google.com/file/d/15HhNvNoUn5qX1GhkjDaifA3G05PLoIwO/view?usp=sharing Bug: 157174391 Change-Id: I8314d5aa309fe020a4121753d4e76ca10370c626 --- .../quickstep/views/OverviewActionsView.java | 8 ++++- .../res/layout/overview_actions_container.xml | 29 ++++++++++--------- .../launcher3/config/FeatureFlags.java | 3 ++ 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/OverviewActionsView.java index f06a6a4182..b092d1954d 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/OverviewActionsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/OverviewActionsView.java @@ -17,6 +17,7 @@ package com.android.quickstep.views; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; +import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_SHARE; import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview; import android.content.Context; @@ -91,8 +92,13 @@ public class OverviewActionsView extends FrameLayo @Override protected void onFinishInflate() { super.onFinishInflate(); - findViewById(R.id.action_share).setOnClickListener(this); + View share = findViewById(R.id.action_share); + share.setOnClickListener(this); findViewById(R.id.action_screenshot).setOnClickListener(this); + if (ENABLE_OVERVIEW_SHARE.get()) { + share.setVisibility(VISIBLE); + findViewById(R.id.share_space).setVisibility(VISIBLE); + } } /** diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml index 1ecec25268..2371d86b0e 100644 --- a/quickstep/res/layout/overview_actions_container.xml +++ b/quickstep/res/layout/overview_actions_container.xml @@ -14,13 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. --> - + android:layout_marginRight="@dimen/overview_actions_horizontal_margin"> + - + android:layout_weight="1" /> +