バージョンの問題だと思います。ギャラクシータブにはハニカム以上のバージョンがありますが、5インチのスクリーンはハニカム以下のバージョンがあります。
TextView textView;
String stringToBeExtracted;
int startingIndex=textView.getSelectionStart();
int endingIndex=textView.getSelectionEnd();
stringToBeExtracted = stringYouExtracted.subString(startingIndex, endingIndex);
if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB) {
android.text.ClipboardManager clipboard = (android.text.ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
clipboard.setText(stringToBeExtracted);
} else {
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
android.content.ClipData clip = android.content.ClipData.newPlainText("Text Copied", stringToBeExtracted);
clipboard.setPrimaryClip(clip);
}
textisselectableとpopupWindowとscrollview文句を言わない仕事:
は、このコードを試してみてください。たぶんそのアンドロイドのバグ –
'ScrollView'はありませんし、質問が小さな5インチデバイスではないタブレットでうまく働いていると言われています。 – mjosh