I have the following code:
startButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
        Toast.makeText(MainActivity.this, "Please, login to start.",
            Toast.LENGTH_SHORT).show();
        checkPermissionAndStartLogin();
    }
});
On some devices (e.g. Samsung with API level 23) this code leads to Screen Overlay issue, because permissions dialog and Toast are showing at the same time.
How can I fix this issue without removing Toast? Because I need Toast and permissions both. Thank you.
 
     
    