Как я могу ограничить тень, отбрасываемую событием onTouch, так как View.OnTouchListener может быть перемещен только в пределах родительского представления?У меня есть ImageView внутри LinearLayout, и когда я перетаскиваю их, я хочу, чтобы тень не превышала границ линейного макета.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/llMain"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv1"
android:layout_width="100dp"
android:layout_height="match_parent"
android:background="@color/red" />
<ImageView
android:id="@+id/iv2"
android:layout_width="100dp"
android:layout_height="match_parent"
android:background="@color/yellow" />
<ImageView
android:id="@+id/iv3"
android:layout_width="100dp"
android:layout_height="match_parent"
android:background="@color/green" />
</LinearLayout>
</LinearLayout>