我使用editext進行聊天。一切都很好。但是當我輸入單引號,那麼它顯示的',當我輸入雙引號,然後顯示的",所以我想限制這兩個字符。如何在edittext中限制單引號和雙引號
<EditText
android:id="@+id/editText_add_chat_afcdl"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:padding="13dp"
android:textColor="@android:color/black"
android:inputType="textMultiLine"
android:maxLength="256"
android:textSize="18sp"
android:maxLines="5"
android:layout_centerVertical="true"
android:hint="@string/chatMsgHint"
android:textColorHint="#C3C3C8"
android:layout_toLeftOf="@+id/button_add_afcdl"
android:background="@drawable/rounded_edittext" />
的可能的複製[如何限制編輯文字到一些特定的字符在Android?](http://stackoverflow.com/questions/17113942/how-to-restrict-edittext-to -some-particular-characters-in-android) – Sufian