2

I know it's similar to textview textIsSelectable="true" not working in Listview.

Everything is fine when TextView is along, copy, parse. But when it's in list's item. I long click in Textview, The copy and parse menu seems appeal in top(ActionBar), but it dismisses in half a second.

I guess, the ListView is pushed down, so it's recall getView(). Ok, It's my guess.

Can anyone helps me.

My English is poor. If it's unclear, forgive me....

Thanks

My getView:

            if (convertView == null) {
                convertView = getLayoutInflater().inflate(R.layout.item_list, parent, false);
            }
            TextView textView = (TextView) convertView;
            textView.setFocusable(true);
            textView.setFocusableInTouchMode(true);
            if (TextUtils.isEmpty(textView.getText())) {
                textView.setText("fdafdafdafkdsfjkldsfjioewjfiodsajlf" + position);
            }
            return convertView;

My item_list.xml:

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
          android:padding="20dp"
          android:textIsSelectable="true"
          android:id="@+id/textView"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

</TextView>

If it goes normal, the copy and parse menu comes:

enter image description here

But in ListView, the action bar menu pushed ListView down so ListView let this menu gone?

Community
  • 1
  • 1
user3875388
  • 541
  • 1
  • 6
  • 19

0 Answers0