Closed JagadishaIncture closed 3 years ago
I’m not sure what is happening here. Are you able to share a small code snippet of the layout/click handling which reproduces this issue?
<me.thanel.swipeactionview.SwipeActionView android:id="@+id/swipeView" android:layout_width="match_parent" android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:backgroundTint="@color/ote_blue"
android:elevation="0dp"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:backgroundTint="@color/material_orange"
android:padding="@dimen/material_margin_xs"
app:cardCornerRadius="3dp">
<TextView
android:id="@+id/tvAction1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:padding="@dimen/material_margin_medium"
android:text="@string/hold"
android:textColor="@color/white" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/tvAction2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:padding="@dimen/material_margin_medium"
android:text="@string/complete"
android:textColor="@color/white" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
app:cardCornerRadius="3dp">
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
<CheckBox
android:layout_width="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:visibility="gone"
android:id="@+id/check_box"
android:layout_height="wrap_content"/>
<include layout="@layout/rv_inbox_item" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</me.thanel.swipeactionview.SwipeActionView>
layout/rv_inbox_item file
`<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/clParent" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white">
<ImageView
android:id="@+id/ivStatus"
android:layout_width="16dp"
android:contentDescription="@string/image_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/material_margin_medium"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_circle" />
<com.chootdev.typefaced.TypeFacedTextView
android:id="@+id/tvTitle"
app:textView_font="@string/font_regular"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/material_margin_small"
android:layout_marginStart="@dimen/material_margin_medium"
android:ellipsize="end"
android:paddingEnd="5dp"
android:maxEms="13"
android:maxLines="1"
android:text="Purchase Order Approval"
android:textSize="@dimen/ts_sm"
android:textStyle="bold"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toRightOf="@id/ivStatus"
app:layout_constraintRight_toLeftOf="@id/tvCreatedOn"
app:layout_constraintTop_toTopOf="@id/ivStatus" />
<com.chootdev.typefaced.TypeFacedTextView
android:id="@+id/tvCreatedOn"
app:textView_font="@string/font_regular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/material_margin_medium"
android:layout_marginStart="5dp"
android:text="1 min ago"
android:textColor="@color/material_medium_gray"
android:textSize="@dimen/ts_xs"
app:layout_constraintBottom_toBottomOf="@id/tvTitle"
app:layout_constraintRight_toRightOf="parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="@color/ote_disabled"
android:id="@+id/next"
android:contentDescription="@string/image_content"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="@id/tvCreatedOn"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_right" />
<com.chootdev.typefaced.TypeFacedTextView
android:id="@+id/tvIncidentID"
app:textView_font="@string/font_regular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Request Id: P000035"
android:textColor="@color/ote_blue"
android:textSize="@dimen/ts_xs"
app:layout_constraintLeft_toLeftOf="@id/tvTitle"
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
<com.chootdev.typefaced.TypeFacedTextView
android:id="@+id/tvSubject"
app:textView_font="@string/font_regular"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingEnd="5dp"
android:text="POA for P000002"
app:layout_constraintBottom_toTopOf="@id/tvDescription"
app:layout_constraintHorizontal_bias="0.000"
app:layout_constraintLeft_toLeftOf="@id/tvTitle"
app:layout_constraintRight_toLeftOf="@id/next"
app:layout_constraintTop_toBottomOf="@id/tvIncidentID"
app:layout_constraintVertical_chainStyle="packed" />
<com.chootdev.typefaced.TypeFacedTextView
android:id="@+id/tvDescription"
app:textView_font="@string/font_regular"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/material_margin_medium"
android:text="Approval of PO No. P000002 from Vendor No. 234511 for a value of $14,000."
android:textColor="@color/ote_disabled"
app:layout_constraintBottom_toTopOf="@id/tvSLA"
app:layout_constraintLeft_toLeftOf="@id/tvTitle"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSubject" />
<com.chootdev.typefaced.TypeFacedTextView
android:id="@+id/tvSLA"
app:textView_font="@string/font_regular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/placeholder_short"
android:textColor="@color/material_red"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/tvTitle"
app:layout_constraintTop_toBottomOf="@id/tvDescription" />
<TextView
android:id="@+id/tvDiv"
android:layout_width="0dp"
android:layout_height="0.5dp"
android:layout_marginTop="@dimen/material_margin_medium"
android:background="@color/material_medium_gray"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/clParent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSLA" />
</androidx.constraintlayout.widget.ConstraintLayout>`
Doesn't look like an issue with SwipeActionView
. I can't reproduce any flashing behavior with the provided sample. Either your click recognition code is changing the background color of your view or something else is happening.
Did you check whether the issue also happens when you display your clickable view above other view with different background? This would confirm that it is issue only with SwipeActionView?
<application android:hardwareAccelerated="true" ...>
adding this in Manifest fixed the issue
Hey, i want to use this library for my app, is it still supported? @Tunous
Hey, i want to use this library for my app, is it still supported? @Tunous
Issue is fixed.. you can use this awesome library.
SwipeView click give some blinking effect
link : https://incturet-my.sharepoint.com/:v:/g/personal/jagadisha_n_incture_com/EUXUxY5dP2NFuAp1gA22iJ4BKFK3KcSw28hpyw8rkYUuvg?e=yBS0mr