Created
March 23, 2018 23:59
-
-
Save adrianhall/9fbb3a8819bf621c6e85dda8a2a94c25 to your computer and use it in GitHub Desktop.
Customize the Authentication UI
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
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
// Create an auth UI configuration | |
var uiConfig = AuthUIConfiguration.Builder() | |
// Specify the providers | |
.userPools(true) | |
.canCancel(true) | |
// Specify the UI customizations | |
.logoResId(R.drawable.icon_tasks) | |
.backgroundColor(ContextCompat.getColor(this, R.color.colorPrimary)) | |
.isBackgroundColorFullScreen(true) | |
// Build the configuration | |
.build() | |
// Pull in the SignInUI | |
val ui = AWSProvider.instance!!.getClient(this, SignInUI::class.java) as SignInUI | |
ui.login(this, MainActivity::class.java) | |
.authUIConfiguration(uiConfig) | |
.execute() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment