android button double click starts activity two times code example
Example: android java how to stop activity from opening twice programatically
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);