I have one TextView (sub_text) on the main snippet and another RecyclerView (rv) containing TextView elements.
I get different amounts of elements when I try to select text in a RecyclerView. There is no choice from other applications that implement ACTION_PROCESS_TEXT.
My selected items are only partial - unlike other stackoverflow questions (for example, "android: textIsSelectable =" true "doesn't work for TextView in RecyclerView ), where the selection is completely missing or doesn't work.
How to make elements in rv text element be the same as textView fragment?
in my TextView, I get a toolbar for selecting floating text

However, when I try to select text from the Recycler view, I get the following floating text selection toolbar

Please note that in RV there are only 2 selectable items?
xml for sub_text
<TextView
android:id="@+id/sub_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:textSize="16sp"
android:padding="8dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="@color/primary"
android:textIsSelectable="true"
android:visibility="gone" />
xml for rv is
<android.support.v7.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:scrollbars="vertical"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
xml for text view inside rv
<TextView
android:id="@+id/tv_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:text="经"
android:textColor="@color/primary_dark"
android:textIsSelectable="true" />
source
share