SwipeActionView icon indicating copy to clipboard operation
SwipeActionView copied to clipboard

Click events is not triggering untill double tap in some Samsung Devices above Android 10

Open JagadishaIncture opened this issue 4 years ago • 6 comments

Hi SwipeActionView is not allowing child views to trigger Click Event untill thy tap it for twice.. this issue is not in all devices it only occur in Samsung Android 10 + devices (Samsung S20)

JagadishaIncture avatar Jun 24 '21 11:06 JagadishaIncture

` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:orientation="vertical" android:layout_height="wrap_content">

<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="?themeColorPrimary">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="horizontal">

            <com.chootdev.typefaced.TypeFacedTextView
                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_common"
                app:textView_font="@string/font_semi_bold" />

            <com.chootdev.typefaced.TypeFacedTextView
                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_common"
                app:textView_font="@string/font_semi_bold" />

            <com.chootdev.typefaced.TypeFacedTextView
                android:id="@+id/tvAction3"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:background="?themeColorPrimary"
                android:gravity="center"
                android:padding="@dimen/material_margin_medium"
                android:text="@string/chat"
                android:textColor="@color/white_common"
                android:visibility="gone"
                app:textView_font="@string/font_semi_bold" />

        </LinearLayout>
    </androidx.cardview.widget.CardView>

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardBackgroundColor="@color/white"
        app:cardCornerRadius="3dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:id="@+id/outer_ll"
            android:orientation="horizontal">


            <CheckBox
                android:id="@+id/check_box"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:visibility="gone" />

            <include layout="@layout/rv_inbox_item" />

        </LinearLayout>


    </androidx.cardview.widget.CardView>


</me.thanel.swipeactionview.SwipeActionView>

</LinearLayout>`

JagadishaIncture avatar Jun 24 '21 11:06 JagadishaIncture

<LinearLayout 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:background="@color/white" android:layout_height="wrap_content">

<androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/ivStatus"
        android:layout_width="16dp"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/material_margin_small"
        android:contentDescription="@string/image_content"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_circle" />

    <com.chootdev.typefaced.TypeFacedTextView
        android:id="@+id/tvTitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="@dimen/material_margin_small"
        android:ellipsize="end"
        android:maxEms="13"
        android:maxLines="1"
        android:paddingEnd="5dp"
        android:text="Purchase Order Approval"
        android:textColor="@color/black"
        android:textSize="@dimen/ts_small"
        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"
        app:textView_font="@string/font_semi_bold" />

    <com.chootdev.typefaced.TypeFacedTextView
        android:id="@+id/tvCreatedOn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="5dp"
        android:layout_marginEnd="@dimen/material_margin_medium"
        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"
        app:textView_font="@string/font_semi_bold" />

    <ImageView
        android:id="@+id/next"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        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"
        app:tint="@color/ote_disabled" />

    <com.chootdev.typefaced.TypeFacedTextView
        android:id="@+id/tvIncidentID"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingTop="2dp"
        android:text="Request Id: P000035"
        android:textColor="@color/ote_blue"
        android:textSize="@dimen/ts_xs"
        android:visibility="gone"
        app:layout_constraintLeft_toLeftOf="@id/tvTitle"
        app:layout_constraintTop_toBottomOf="@id/tvTitle"
        app:textView_font="@string/font_regular" />

    <com.chootdev.typefaced.TypeFacedTextView
        android:id="@+id/tvSubject"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:paddingTop="2dp"
        android:paddingEnd="5dp"
        android:text="POA for P000002"
        android:textSize="13sp"
        app:layout_constraintLeft_toLeftOf="@id/tvTitle"
        app:layout_constraintRight_toRightOf="@id/next"
        app:layout_constraintTop_toBottomOf="@id/tvIncidentID"
        app:textView_font="@string/font_semi_bold" />

    <com.chootdev.typefaced.TypeFacedTextView
        android:id="@+id/tvDescription"
        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"
        android:textSize="@dimen/ts_xs"
        app:layout_constraintLeft_toLeftOf="@id/tvTitle"
        app:layout_constraintRight_toRightOf="@id/next"
        app:layout_constraintTop_toBottomOf="@id/tvSubject"
        app:textView_font="@string/font_semi_bold" />


    <ImageView
        android:id="@+id/option"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="8dp"
        android:contentDescription="@string/image_content"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/tvDescription"
        app:layout_constraintLeft_toRightOf="@id/tvDescription"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="@id/tvDescription"
        app:srcCompat="@drawable/icon_options"
        app:tint="@color/ote_disabled" />

    <com.chootdev.typefaced.TypeFacedTextView
        android:id="@+id/tvSLA"
        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"
        app:textView_font="@string/font_regular" />

    <TextView
        android:id="@+id/tvDiv"
        android:layout_width="0dp"
        android:layout_height="0.5dp"
        android:layout_marginTop="5dp"
        android:background="@color/material_medium_gray"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvSLA" />

</androidx.constraintlayout.widget.ConstraintLayout>

JagadishaIncture avatar Jun 24 '21 11:06 JagadishaIncture

Case 1 : If i give click even for parent view of SwipeView Event itself is not Trigger

Case 2: if i give click event for SwipeActionView . event is trigger for both childview and childactions

` holder.swipeView.setOnClickListener(view -> {

        Log.d("ResponseClick", "Clicked");
    
    });

`

Case 3: if i give click event for Outer_ll which is click of SwipeActionView . then event is not trigger in Samsung device (Works on all other devices).

` holder.outer_ll.setOnClickListener(view -> {

        Log.d("ResponseClick", "Clicked");
    
    });`

JagadishaIncture avatar Jun 24 '21 11:06 JagadishaIncture

I'm not sure how to reproduce this since I do not own any Samsung devices but perhaps the change in #23 fixes it?

You can test it by changing dependency in build.gradle to

implementation 'com.github.Tunous:SwipeActionView:th~22-horizontally-scrolling-child-SNAPSHOT'

Tunous avatar Jun 24 '21 14:06 Tunous

No Need to do any code level change ?

Jagadisha N

Consultant - Technology

E: @.***

T: +91 8072734291 | W: www.incture.comhttp://www.incture.com/


From: Łukasz Rutkowski @.> Sent: Thursday, June 24, 2021 8:16 PM To: Tunous/SwipeActionView @.> Cc: Jagadisha N @.>; Author @.> Subject: Re: [Tunous/SwipeActionView] Click events is not triggering untill double tap in some Samsung Devices above Android 10 (#29)

I'm not sure how to reproduce this since I do not own any Samsung devices but perhaps the change in #23https://github.com/Tunous/SwipeActionView/pull/23 fixes it?

You can test it by changing dependency in build.gradle to

implementation 'com.github.Tunous:SwipeActionView:th~22-horizontally-scrolling-child-SNAPSHOT'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Tunous/SwipeActionView/issues/29#issuecomment-867695825, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANLD5S5G4VQQMVCJVZJP6ODTUNAMPANCNFSM47HWNZ2Q.

‘This e-mail may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it permanently.’

‘This e-mail may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it permanently.’

JagadishaIncture avatar Jun 25 '21 04:06 JagadishaIncture

No, that is internal change only. But again, this might not fix the issue and is just my blind guess.

Tunous avatar Jun 25 '21 05:06 Tunous