i have a LinearLayout that content textView, then i put LongClick to this linearlayout to show dialog, but only longclick to this layout outside of textview make dialog show, click in textview make nothing appear
<LinearLayout
android:id="@id/bubble"
android:tag="69"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="30dp"
android:layout_marginRight="30dp"
android:descendantFocusability="blocksDescendants"
android:layout_toEndOf="@id/messageUserAvatar"
android:layout_toRightOf="@id/messageUserAvatar"
android:orientation="vertical">
<TextView
android:id="@id/messageText"
android:duplicateParentState="true"
android:clickable="false"
android:longClickable="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp" />
can someone help
I believe this happens because the TextView is above the Linear Layout. easy fix for this is to put a View on top of all of them maybe using FrameLayout then putting an empty view with transparent background and listen to click from that Empty view instead.
and on the java