I have a scroll view which contains a lot of images. I want to implement a highlight zone which changes color of all views below it (only part of view which right below the zone)
Here are the layout, vOverlayColor
is the view that I want to set overlay color.
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_large"
android:adjustViewBounds="true"
android:src="@drawable/ic_delete"
android:tint="@color/colorGreyDark"
tools:ignore="ContentDescription" />
<ImageView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_large"
android:adjustViewBounds="true"
android:src="@drawable/ic_delete"
android:tint="@color/colorGreyDark"
tools:ignore="ContentDescription" />
<ImageView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_large"
android:adjustViewBounds="true"
android:src="@drawable/ic_delete"
android:tint="@color/colorGreyDark"
tools:ignore="ContentDescription" />
<ImageView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_large"
android:adjustViewBounds="true"
android:src="@drawable/ic_delete"
android:tint="@color/colorGreyDark"
tools:ignore="ContentDescription" />
<ImageView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_large"
android:adjustViewBounds="true"
android:src="@drawable/ic_delete"
android:tint="@color/colorGreyDark"
tools:ignore="ContentDescription" />
</LinearLayout>
</ScrollView>
<View
android:id="@+id/vOverlayColor"
android:layout_width="match_parent"
android:layout_height="120dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Do you have any suggestion?