Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be4333a0 authored by mattsziklay's avatar mattsziklay
Browse files

Enable dragging caption via App Info view.

Allows for dragging caption (reposition or resize) via the App Info
view, making dragging easier on particularly smaller tasks.

Bug: 277953657
Test: Manual testing
Change-Id: I34fcf3341e84d19e83c756d1f2c10436fe64affc
parent 784bd58d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -31,8 +31,7 @@
        android:orientation="horizontal"
        android:clickable="true"
        android:focusable="true"
        android:paddingStart="8dp"
        android:background="?android:selectableItemBackgroundBorderless">
        android:paddingStart="8dp">

        <ImageView
            android:id="@+id/application_icon"
@@ -88,6 +87,6 @@
        android:src="@drawable/decor_close_button_dark"
        android:scaleType="fitCenter"
        android:gravity="end"
        android:background="?android:selectableItemBackgroundBorderless"
        android:background="@null"
        android:tint="@color/desktop_mode_caption_close_button_dark"/>
</com.android.wm.shell.windowdecor.WindowDecorLinearLayout>
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -335,7 +335,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
        @Override
        public boolean onTouch(View v, MotionEvent e) {
            final int id = v.getId();
            if (id != R.id.caption_handle && id != R.id.desktop_mode_caption) {
            if (id != R.id.caption_handle && id != R.id.desktop_mode_caption
                    && id != R.id.open_menu_button && id != R.id.close_window) {
                return false;
            }
            moveTaskToFront(mTaskOrganizer.getRunningTaskInfo(mTaskId));
+2 −0
Original line number Diff line number Diff line
@@ -35,7 +35,9 @@ internal class DesktopModeAppControlsWindowDecorationViewHolder(
        captionView.setOnTouchListener(onCaptionTouchListener)
        captionHandle.setOnTouchListener(onCaptionTouchListener)
        openMenuButton.setOnClickListener(onCaptionButtonClickListener)
        openMenuButton.setOnTouchListener(onCaptionTouchListener)
        closeWindowButton.setOnClickListener(onCaptionButtonClickListener)
        closeWindowButton.setOnTouchListener(onCaptionTouchListener)
        appNameTextView.text = appName
        appIconImageView.setImageDrawable(appIcon)
    }