-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Proposal - API for Custom Layout for AuthMethodPickerActivity #1494
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamyaoxi thanks so much for this! Functionally it looks great, I just have some minor API comments.
Also could you change the target branch to version-4.3.0-dev
? That's the next feature release. If you need any help with conflicts that come up just let me know, I am happy to deal with that.
Bundle buttonsBundle = in.readBundle(getClass().getClassLoader()); | ||
this.providersButton = new HashMap<>(); | ||
|
||
for (String key : buttonsBundle.keySet()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep a static list somewhere of the accepted String
keys here? Maybe it's the same as @SupportedProvider
. I just want to make sure we're validating data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think if we just use AuthUI.SUPPORTED_PROVIDERS to validate data?
auth/src/main/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivity.java
Show resolved
Hide resolved
auth/src/main/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivity.java
Outdated
Show resolved
Hide resolved
In the latest commit, I separated sign-in handler to a different function, to reduce duplicated code between I'm still thinking there might be more efficient or safer than this, rather than just to make sure it works. Any suggestions? @samtstern @lsirac @SUPERCILEX |
@iamyaoxi let me know if you need help with any of these conflicts! |
@samtstern Oh, turns out I can! |
@iamyaoxi thanks for handling that! I will hopefully be able to merge this soon, but it may take a few days due to the Firebase Summit. Very excited about this feature! |
@iamyaoxi thanks for your patience! Took a final look at this and it's great. I will probably follow this change with some small tweaks to the sample app, but this will launch in 4.3.0. |
Hi @samtstern @iamyaoxi How do we implement this in Android? Can't see documentation anywhere. |
@yajur96 here are the docs about using custom layouts: The sample app in the |
I'm trying to propose API (and later, implementation) for issue #1477
My idea is:
AuthLayout
, where developers can set up main layout, and add button IDs for each provider if needed.OnClickListener
on those button ID to direct the app to sign-in with selected Auth provider.What do you guys think?