Merge "Intercept touch events for launcher preview root view" into sc-v2-dev am: 0aa22aaea1

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15145779

Change-Id: I8b1c5399ae7c72922967c53e83abbb9440ea4e08
This commit is contained in:
Brian Isganitis
2021-06-30 00:12:21 +00:00
committed by Automerger Merge Worker
2 changed files with 15 additions and 2 deletions
+2 -2
View File
@@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.launcher3.InsettableFrameLayout
<view class="com.android.launcher3.graphics.LauncherPreviewRenderer$LauncherPreviewLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@@ -33,4 +33,4 @@
android:id="@+id/hotseat"
layout="@layout/hotseat" />
</com.android.launcher3.InsettableFrameLayout>
</view>
@@ -46,6 +46,7 @@ import android.util.AttributeSet;
import android.util.SparseIntArray;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowInsets;
@@ -534,4 +535,16 @@ public class LauncherPreviewRenderer extends ContextWrapper
return false;
}
}
/** Root layout for launcher preview that intercepts all touch events. */
public static class LauncherPreviewLayout extends InsettableFrameLayout {
public LauncherPreviewLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return true;
}
}
}