forcedotcom / SalesforceMobileSDK-Android

Android SDK for Salesforce

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove menu tab and navigation bar (server change menu)

johnjeremih opened this issue · comments

I would like to know how I can override the loadLoginPageInChrome function to be able to remove the navigation bar. I'm currently overriding the LoginActivity class to be able to have a custom view.

image

There is no easy/clean way of doing that today. You would have to create subclasses for LoginActivity and OAuthWebviewHelper. Initialize SalesforceSDKManager using your LoginActivity class. Have you LoginActivityClass create you OAuthWebviewHelper. And in your OAuthWebviewHelper you would have to override (with some code duplication) methods that call doLoadPage, because doLoadPage is private and calls loadLoginPageInChrome which is also private.
Alternatively you could fork Mobile SDK. Both options are not very appealing.

One question, do you need to use advanced authentication? With regular authentication (which uses a web view), it's a lot easier to remove the navigation bar.

I'm using the webview, but I'm not able to remove the navigation bar