download file and ask for permissions to write into storage
This commit is contained in:
@@ -28,4 +28,19 @@ public class Toasty {
|
||||
|
||||
}
|
||||
|
||||
public static void error(Context context, String message) {
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
View view = inflater.inflate( context.getResources().getLayout(R.layout.custom_toast_error), null );
|
||||
|
||||
TextView text = view.findViewById(R.id.toastText);
|
||||
text.setText(message);
|
||||
|
||||
Toast toast = new Toast(context);
|
||||
toast.setDuration(Toast.LENGTH_LONG);
|
||||
toast.setView(view);
|
||||
toast.show();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user