mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Prevent crash
This commit is contained in:
@@ -21,7 +21,10 @@ public class ToastEx extends Toast {
|
||||
ToastEx toast = new ToastEx(context);
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
View view = inflater.inflate(R.layout.toast, null);
|
||||
view.setBackground(context.getResources().getDrawable(R.drawable.toast_background, context.getTheme()));
|
||||
|
||||
TextView tv = view.findViewById(android.R.id.message);
|
||||
tv.setTextColor(Helper.resolveColor(context, R.attr.colorToastForeground));
|
||||
tv.setText(text);
|
||||
toast.setView(view);
|
||||
toast.setDuration(duration);
|
||||
|
||||
Reference in New Issue
Block a user