diff options
| -rw-r--r-- | packages/SystemUI/res/drawable/screenshot_button_background.xml (renamed from packages/SystemUI/res/drawable/screenshot_save_background.xml) | 2 | ||||
| -rw-r--r-- | packages/SystemUI/res/layout/long_screenshot.xml | 17 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java | 2 |
3 files changed, 19 insertions, 2 deletions
diff --git a/packages/SystemUI/res/drawable/screenshot_save_background.xml b/packages/SystemUI/res/drawable/screenshot_button_background.xml index b61b28ed1d9e..3c39fe2ecb06 100644 --- a/packages/SystemUI/res/drawable/screenshot_save_background.xml +++ b/packages/SystemUI/res/drawable/screenshot_button_background.xml @@ -14,7 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -<!-- Long screenshot save button background --> +<!-- Long screenshot save/cancel button background --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:color="?android:textColorPrimary"> diff --git a/packages/SystemUI/res/layout/long_screenshot.xml b/packages/SystemUI/res/layout/long_screenshot.xml index 5a717db3aa6a..8a2c8f09948d 100644 --- a/packages/SystemUI/res/layout/long_screenshot.xml +++ b/packages/SystemUI/res/layout/long_screenshot.xml @@ -32,12 +32,27 @@ android:text="@string/save" android:layout_marginStart="8dp" android:layout_marginTop="4dp" - android:background="@drawable/screenshot_save_background" + android:background="@drawable/screenshot_button_background" android:textColor="?android:textColorSecondary" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toTopOf="@id/preview" /> + <Button + android:id="@+id/cancel" + style="@android:style/Widget.DeviceDefault.Button.Colored" + android:layout_width="wrap_content" + android:layout_height="40dp" + android:text="@android:string/cancel" + android:layout_marginStart="6dp" + android:layout_marginTop="4dp" + android:background="@drawable/screenshot_button_background" + android:textColor="?android:textColorSecondary" + app:layout_constraintStart_toEndOf="@id/save" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toTopOf="@id/preview" + /> + <ImageButton android:id="@+id/share" style="@android:style/Widget.Material.Button.Borderless" diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java index 741dddc49378..35637f66d0df 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java @@ -126,6 +126,8 @@ public class LongScreenshotActivity extends Activity { mTransitionView = requireViewById(R.id.transition); mEnterTransitionView = requireViewById(R.id.enter_transition); + requireViewById(R.id.cancel).setOnClickListener(v -> finishAndRemoveTask()); + mSave.setOnClickListener(this::onClicked); mEdit.setOnClickListener(this::onClicked); mShare.setOnClickListener(this::onClicked); |