User interaction on compose keyboard

This commit is contained in:
M66B 2019-12-25 09:16:36 +01:00
parent ab16b29f91
commit 5ceeae833d
1 changed files with 21 additions and 0 deletions

View File

@ -53,10 +53,12 @@ import android.os.OperationCanceledException;
import android.provider.ContactsContract;
import android.provider.MediaStore;
import android.security.KeyChain;
import android.text.Editable;
import android.text.Html;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.style.ImageSpan;
import android.text.style.QuoteSpan;
import android.util.TypedValue;
@ -447,6 +449,25 @@ public class FragmentCompose extends FragmentBase {
}
});
etBody.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// Do nothing
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
Activity activity = getActivity();
if (activity != null)
activity.onUserInteraction();
}
@Override
public void afterTextChanged(Editable s) {
// Do nothing
}
});
cbSignature.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {