Мерцание изображений внутри GridLayout внутри ScrollView
Я имею ScrollView
и внутри у меня есть GridLayout
и внутри GridLayout
У меня есть изображения, но когда я прокручиваю изображения (ImageView
) начать щелкать. Это происходит только в API 22 или ниже.
Мой макет выглядит так:
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:fadingEdgeLength="30dp"
android:requiresFadingEdge="vertical">
<android.support.v7.widget.GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:alignmentMode="alignMargins"
app:columnCount="2"
app:useDefaultMargins="true">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/img_store"
app:layout_columnWeight="1"
tools:ignore="ContentDescription" />
<-- More images -->
</android.support.v7.widget.GridLayout>
</ScrollView>
1 ответ
Я только что решил, я установил вид с
view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);