Java 如何使android:textIsSelectable=“true”符合我的意图?
我无法将文本视图设置为可编辑状态-虽然我可以将其设置为可编辑状态,但无法通过意图将文本传递给其他活动 在我的视图活动的xml中,对于我的textViewComment文本框,我有:Java 如何使android:textIsSelectable=“true”符合我的意图?,java,android,android-intent,Java,Android,Android Intent,我无法将文本视图设置为可编辑状态-虽然我可以将其设置为可编辑状态,但无法通过意图将文本传递给其他活动 在我的视图活动的xml中,对于我的textViewComment文本框,我有: <TextView android:id="@+id/textViewComment" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:backg
<TextView
android:id="@+id/textViewComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/textboxes_for_contact"
android:textIsSelectable="true"
在EditContact类中:
textViewComment的我的EditContact类中的xml为:
您知道如何在成功传递意图的同时使ViewContact中的文本可选择吗?这是已知问题吗?更换:
i.putExtra("comment", commentname.getText());
与:
看看你是否运气更好。i.putexcomment,commentname.getText.toString;
comment = i.getStringExtra("comment");
<EditText
android:id="@+id/textViewComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="textCapSentences"
android:background="@drawable/textboxes_for_contact"
android:maxLength="360"
/>
i.putExtra("comment", commentname.getText());
i.putExtra("comment", commentname.getText().toString());