mirror of https://github.com/M66B/FairEmail.git
85 lines
2.5 KiB
Java
85 lines
2.5 KiB
Java
package eu.faircode.email;
|
|
|
|
/*
|
|
This file is part of FairEmail.
|
|
|
|
FairEmail is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
FairEmail is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
Copyright 2018-2022 by Marcel Bokhorst (M66B)
|
|
*/
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Canvas;
|
|
import android.util.AttributeSet;
|
|
import android.view.MotionEvent;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView;
|
|
|
|
public class EditTextMultiAutoComplete extends AppCompatMultiAutoCompleteTextView {
|
|
public EditTextMultiAutoComplete(@NonNull Context context) {
|
|
super(context);
|
|
Helper.setKeyboardIncognitoMode(this, context);
|
|
}
|
|
|
|
public EditTextMultiAutoComplete(@NonNull Context context, @Nullable AttributeSet attrs) {
|
|
super(context, attrs);
|
|
Helper.setKeyboardIncognitoMode(this, context);
|
|
}
|
|
|
|
public EditTextMultiAutoComplete(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
|
super(context, attrs, defStyleAttr);
|
|
Helper.setKeyboardIncognitoMode(this, context);
|
|
}
|
|
|
|
@Override
|
|
public boolean onPreDraw() {
|
|
try {
|
|
return super.onPreDraw();
|
|
} catch (Throwable ex) {
|
|
Log.w(ex);
|
|
return true;
|
|
}
|
|
}
|
|
|
|
@Override
|
|
protected void onDraw(Canvas canvas) {
|
|
try {
|
|
super.onDraw(canvas);
|
|
} catch (Throwable ex) {
|
|
Log.w(ex);
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public boolean dispatchTouchEvent(MotionEvent event) {
|
|
try {
|
|
return super.dispatchTouchEvent(event);
|
|
} catch (Throwable ex) {
|
|
Log.w(ex);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public boolean onTouchEvent(MotionEvent event) {
|
|
try {
|
|
return super.onTouchEvent(event);
|
|
} catch (Throwable ex) {
|
|
Log.w(ex);
|
|
return false;
|
|
}
|
|
}
|
|
} |