forcedotcom/SalesforceMobileSDK-Android

Hide settings icon(menu options) for Login screen.

Closed this issue · 1 comments

  1. Version of Mobile SDK Used: 11.1.0
  2. Issue found in Native App or Hybrid App:Android Native App
  3. OS Version:All Versions
  4. Device:All Devices
  5. Steps to reproduce:Navigate to Salesforce Login Page.
  6. Actual behavior:
    We are currently using forcedroid version 11.1.0, and we have a requirement to hide the settings icon(menu options) on the Login Page for the release mode. Upon reviewing the documentation, we found that for iOS, there is a provided customization option for the Login Screen:
    Salesforce iOS Login Screen Customization Documentation
    Here is the iOS code snippet for reference:

let loginViewConfig = SalesforceLoginViewControllerConfig()
loginViewConfig.showsSettingsIcon = false
loginViewConfig.showsNavigationBar = true
loginViewConfig.navigationBarColor = UIColor(Color("Green"))
loginViewConfig.navigationBarTintColor = UIColor.white
UserAccountManager.shared.loginViewControllerConfig = loginViewConfig

can we achieve the same in Android or any alternative solution available?

  1. Expected Behavior: Customizing the Android Login Screen Programmatically.
    Or could you suggest how to hide the setting icon in the Login Page.

If you would like to customize or hide the action bar you should create a class that extends LoginActivity. From there you can call getActionBar().hide() and/or any other customization you would like. Then simply add that class to the SDK Manager's initNative call to replace our login activity.