4

I wrote a program that use textIsSelectable property for select a part of text in textview.

Now, I want to call a context-menu (include: copy, highlight, etc such as an ebook reader) when select a part of text it show. I've tried and studied but I've not success yet. I

<TextView
    android:id="@+id/txtContent"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="20px"
    android:textIsSelectable="true"
    android:textSelectHandleLeft="@drawable/text_select_handle_middle1"
    android:textSelectHandleRight="@drawable/text_select_handle_middle1"
    android:text="The consistency gain from standards will improve readability" />
  1. Is this Idea possible that showing a context-menu when I select text?
  2. Could you tell me that how I create it?

Thanks

Omid Nazifi
  • 5,235
  • 8
  • 30
  • 56

0 Answers0