禁止複製/粘貼我試圖讓一個EDITTEXT這不應該讓用戶從內容或粘貼內容複製到它。我閱讀所有ansers一個做到這一點但它不能正常工作對我來說!當我得到的文本長單擊以選中它,顯示我複製/過去.hear我的代碼如何從/到的EditText/TextView的
video.TextViewSelectable類:
}
XML代碼:
<video.TextViewSelectable
android:id="@+id/offLine_subtitleText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="12"
android:ellipsize="middle"
android:gravity="center"
android:textColor="#FFFFFF"
android:clickable="true"
android:textIsSelectable="true"
android:textColorHighlight="#fffffe60"
style="@android:style/Holo.ButtonBar"
android:layout_gravity="center"
android:textSize="15sp"/>
用法:
private TextViewSelectable subtitleText;
subtitleText = (TextViewSelectable)findViewById(R.id.offLine_subtitleText);
subtitleText.setOnSelectionChangedListener(this);
所以這意味着在我的設備我不能禁用,但它有可能與其他其他設備禁用複製粘貼鍵盤?我可以在代碼中解決這個問題嗎? – 2015-03-19 11:10:14