当我长按空的EditText时,粘贴建议弹出框不会出现(非空时可以正常显示)。
XML
<EditText
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:gravity="right"
android:textSize="50sp"
android:inputType="numberDecimal"
android:id="@+id/text"/>
触碰EditText的代码
editText.setRawInputType(InputType.TYPE_NULL);
if (Build.VERSION.SDK_INT >= 11) {
editText.setTextIsSelectable(true);
} else {
editText.setFocusable(true);
}