mirror of https://github.com/M66B/FairEmail.git
Always paste plain text
This commit is contained in:
parent
bebc100c6d
commit
c5473b6f17
|
@ -0,0 +1,29 @@
|
|||
package eu.faircode.email;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatEditText;
|
||||
|
||||
public class EditTextCompose extends AppCompatEditText {
|
||||
public EditTextCompose(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public EditTextCompose(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public EditTextCompose(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTextContextMenuItem(int id) {
|
||||
if (id == android.R.id.paste && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
return super.onTextContextMenuItem(android.R.id.pasteAsPlainText);
|
||||
else
|
||||
return super.onTextContextMenuItem(id);
|
||||
}
|
||||
}
|
|
@ -176,7 +176,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvNoInternetAttachments" />
|
||||
|
||||
<EditText
|
||||
<eu.faircode.email.EditTextCompose
|
||||
android:id="@+id/etBody"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
Loading…
Reference in New Issue