我知道它与textview textIsSelectable="true" not working in Listview类似。
当TextView
出现,复制,解析时,一切都很好。但是当它在列表的项目中时。我长按Textview
,复制和解析菜单似乎在顶部(ActionBar
)有吸引力,但它在半秒内消失。
我想,ListView
被推下来,所以它回忆起getView()
。好的,这是我的猜测。
任何人都可以帮助我。
我的英语很差。如果不清楚,请原谅我......
由于
我的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;
我的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>
如果正常,则复制和解析菜单出现:
但是在ListView
中,操作栏菜单向下推了ListView
所以ListView
让这个菜单消失了吗?