Created
January 31, 2021 17:40
-
-
Save wajahatkarim3/1b4323f67498c7b9faa4c39944d8c2ca to your computer and use it in GitHub Desktop.
Signup click listener before CometChat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Signup | |
bi.btnSignup.setOnClickListener { | |
// Form Validation | |
// .................................. | |
// The random code for dummy signup flow | |
var isDoctor = bi.radioDoctor.isChecked | |
if (isDoctor) { | |
val i = Intent(applicationContext, DoctorMainActivity::class.java) | |
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) | |
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) | |
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) | |
startActivity(i) | |
finish() | |
} | |
else { | |
val i = Intent(applicationContext, MainActivity::class.java) | |
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) | |
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) | |
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) | |
startActivity(i) | |
finish() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment