Amazon's Cognito for mobile comes with a built-in UI which you can customize on the web console, but I've heard that there are more customizable features than just the options presented there.
Below is the my authentication activity in which I believe this customization would take place. This activity works and presents Amazon's default login screen, but I can't find any reference to the login's layout. Does anybody have any experience customizing the UI significantly and is it possible to do it programmatically?
public class AuthenticatorActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_authenticator);
// Add a call to initialize AWSMobileClient
AWSMobileClient.getInstance().initialize(this, new AWSStartupHandler() {
@Override
public void onComplete(AWSStartupResult awsStartupResult) {
SignInUI signin = (SignInUI) AWSMobileClient.getInstance().getClient(AuthenticatorActivity.this, SignInUI.class);
signin.login(AuthenticatorActivity.this, MainNavigationActivity.class).execute();
}
}).execute();
// Sign-in listener
IdentityManager.getDefaultIdentityManager().addSignInStateChangeListener(new SignInStateChangeListener() {
@Override
public void onUserSignedIn() {
Log.d("SignIn", "User Signed In");
}
// Sign-out listener
@Override
public void onUserSignedOut() {
Log.d("SignIn", "User Signed Out");
showSignIn();
}
});
showSignIn();
}
/*
* Display the AWS SDK sign-in/sign-up UI
*/
private void showSignIn() {
Log.d("SignIn", "showSignIn");
SignInUI signin = (SignInUI) AWSMobileClient.getInstance().getClient(AuthenticatorActivity.this, SignInUI.class);
signin.login(AuthenticatorActivity.this, MainNavigationActivity.class).execute();
}
}