menu arrow_back close search On Github

Customise the user experience

  1. Home
  2. Android SDK integration
  3. Customise the user experience

UI locale

CONNECT ID will guess the language and set the appropriate locale for the user.

To explicitly set the locale the user sees in the flows, add the ui_locales parameter and set this with addLoginParameters(...).

@Override
public void onCreate(Bundle savedInstanceState) {
    // ...
    ConnectLoginButton button = (ConnectLoginButton) findViewById(R.id.login_button);
    button.setLoginScopeTokens("profile");

    Map<String, String> additionalLoginParams = new HashMap<>();
    additionalLoginParams.put("ui_locales", "bn en");
    button.addLoginParameters(additionalLoginParams)
}

Loading screen

The native loading screen, which is shown before the WebView has finished loading CONNECT ID is customisable.

@Override
protected void onCreate(Bundle savedInstanceState) {
    // ...
    ConnectLoginButton loginButton = (ConnectLoginButton) findViewById(R.id.login_button);
    loginButton.setCustomLoadingLayout(R.layout.custom_loading_screen);
}

Where R.layout.custom_loading_screen can be any custom layout (.xml) file you have created.

Note, the custom loading screen is only used when Chrome Custom Tabs feature is deactived.

Edit this page