Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to hide tool bar - Cancel & Done button for IOS and Sign In Title bar for Android #2014

Closed
TheCuriousApprentice opened this issue Aug 26, 2020 · 29 comments

Comments

@TheCuriousApprentice
Copy link

TheCuriousApprentice commented Aug 26, 2020

Using .WithEmbeddedWebView does not allow to customize to hide the tool bar options - Cancel and Done button for IOS and Title Bar in Android.

@jennyf19
Copy link
Collaborator

@iambmelt how do you guys handle this in native Android?

@iambmelt
Copy link
Member

@Coder-RKV @jennyf19 If you'd like to hide the title bar on Android, you can apply a theme in your application's AndroidManifest.xml to the relevant Activity -- an example of how to apply a theme can be found here. Note you will need to apply a theme that does not display the title bar.

@TheCuriousApprentice
Copy link
Author

TheCuriousApprentice commented Aug 27, 2020

@iambmelt Thank you for your comment.
Applied a theme that doesn't display the title bar

MSALActivity.cs
[Activity(MainLauncher = false, Theme = "@style/MyTheme")]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.CategoryBrowsable, Intent.CategoryDefault },
DataHost = "auth",
DataScheme = "msal[ClientId]")]
public class MsalActivity : BrowserTabActivity
{
}

styles.xml

<style name="MyTheme" parent="android:Theme"> </style>
<!-- Base theme applied no matter what API -->
<style name="MyTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
  <item name="android:windowBackground">@drawable/splash_bg</item>
  <item name="windowNoTitle">true</item>
  <item name="windowActionBar">false</item>
  <item name="android:windowFullscreen">true</item>

Doesn't help. The Sign In still shows up.

Screen Shot 2020-08-27 at 7 06 23 PM

@iambmelt
Copy link
Member

@Coder-RKV I suggest following up with @jennyf19 -- using the Android library, this is working for me

image

@jennyf19
Copy link
Collaborator

thanks @iambmelt - we hard code the "sign-in" value. will look into this.

@Coder-RKV can you share a screen shot of the issue for iOS?

@TheCuriousApprentice
Copy link
Author

Thank you @iambmelt
This is the sample I am referring to - https://github.com/Azure-Samples/active-directory-b2c-xamarin-native.

@jennyf19 Here's the IOS Screenshot
Screen Shot 2020-08-27 at 8 05 04 PM

Are there any work arounds with any examples that I can explore? Looks like this would be an enhancement.

@jennyf19
Copy link
Collaborator

@Coder-RKV i'll have to ask our iOS team...btw...embedded webview is not recommended for B2C, as Google auth is not allowed w/embedded webview, you'd have to use the system browser. We recommend system browser for B2C for this reason. With system browser and B2C, you can customize all the elements of the sign-in screen. Is that what you're looking for?

@TheCuriousApprentice
Copy link
Author

@jennyf19 The requirement is to give a native app experience to the user since B2C is as of now just utilized for in-house account maintenance for the App. Hence utilized the embedded web view. If using the system browser, we can customize the screen to look like a native screen (I think it pops out in IOS) - like hiding the address bar e.t.c., please guide me to an example of that, I can check that out too.

@jennyf19
Copy link
Collaborator

@Coder-RKV I see. thanks for the additional information. Here's a doc from B2C on UI customization, if you need more help, let us know and we can put you in touch with someone from B2C.
Is this what you're looking for on Android?
image

@TheCuriousApprentice
Copy link
Author

@jennyf19 Thank you. We're already using Custom HTML. So that's covered, thanks.

Its great to not see the Sign In text in the above screenshot, we'd want that but without the black bar as well. Basically, the title bar itself to be hidden.

@jennyf19
Copy link
Collaborator

@Coder-RKV
image
I put this in the manifest:
<application android:theme = "@android:style/Theme.NoTitleBar">

@jennyf19
Copy link
Collaborator

@Coder-RKV Here's a link to b2c samples w/the UI customization: https://docs.microsoft.com/en-us/azure/active-directory-b2c/customize-ui-overview#examples

@TheCuriousApprentice
Copy link
Author

@jennyf19 Thanks a tonne. So this'll be available in the next build or I'd have to try tweaking the manifest for my application (I doubt that's possible as it's already set to a particular style). Per the above comment, I've already tried that with the MSALActivity and that didn't work either.

@jennyf19
Copy link
Collaborator

@Coder-RKV i don't think it will work w/the "sign-in" label hard coded, but w/that removed, you should be able to tweak things. will be in the next release, as the current release that's being tested (4.18) is already in testing mode, so missed that one. how urgent is this for you?

@TheCuriousApprentice
Copy link
Author

@jennyf19 Actually it was a little urgent as this is a part of the sprint and the sprint release is slated for 1st September. Thats why I was trying all that I could to achieve this.

@jennyf19
Copy link
Collaborator

ok. I'll talk w/the team and see what we can do. otherwise, they are on a two week cadence for releases. should know more tomorrow (Friday). @Coder-RKV

@TheCuriousApprentice
Copy link
Author

Thank you so much @jennyf19

@TheCuriousApprentice
Copy link
Author

@jennyf19 Could you also please let know about the IOS side? For the Cancel button?

@jennyf19
Copy link
Collaborator

@Coder-RKV you might be able to use a customer renderer to hide those elements. we don't have a sample showing it though. you'd have to search. if i find anything, i'll let you know.

@TheCuriousApprentice
Copy link
Author

@jennyf19 Sure thanks, will check.

@TheCuriousApprentice
Copy link
Author

@jennyf19 Please let me know if we have any update on the timeline?

@jennyf19 jennyf19 added the Fixed label Aug 28, 2020
@jennyf19
Copy link
Collaborator

@Coder-RKV looks like the team will try to get this out next week. @trwalke will start that process once 4.18 is out the door.

@jennyf19 jennyf19 modified the milestones: 4.19.0, 4.18.1 Aug 28, 2020
@TheCuriousApprentice
Copy link
Author

@jennyf19 Thank you, please also keep me posted on the dates by which we can check out the nugget / branch. So that I can also communicate accordingly.
Thank you again.

@jennyf19
Copy link
Collaborator

sounds like a plan @Coder-RKV

@TheCuriousApprentice
Copy link
Author

@jennyf19 Any update please.

@jennyf19
Copy link
Collaborator

jennyf19 commented Sep 2, 2020

@Coder-RKV this will be in the 4.18 release, which should be out sept 2 or 3.

@jennyf19
Copy link
Collaborator

jennyf19 commented Sep 2, 2020

@Coder-RKV this has been fixed and in release 4.18.

@jennyf19 jennyf19 modified the milestones: 4.18.1, 4.18.0 Sep 2, 2020
@trwalke
Copy link
Member

trwalke commented Sep 2, 2020

Thanks @jennyf19

@trwalke trwalke closed this as completed Sep 2, 2020
@TheCuriousApprentice
Copy link
Author

TheCuriousApprentice commented Sep 11, 2020

@Coder-RKV this has been fixed and in release 4.18.

Thank you @jennyf19 . Implemented and working as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants