Skip to content

Commit 1e86767

Browse files
authored
Add setGithubButtonId to AuthMethodPickerLayout (#1583)
2 parents 26249c7 + b0d7bb2 commit 1e86767

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

auth/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ AuthMethodPickerLayout customLayout = new AuthMethodPickerLayout
884884
.Builder(R.layout.your_custom_layout_xml)
885885
.setGoogleButtonId(R.id.bar)
886886
.setEmailButtonId(R.id.foo)
887+
.setGithubButtonId(R.id.github)
887888
// ...
888889
.setTosAndPrivacyPolicyId(R.id.baz)
889890
.build();

auth/src/main/java/com/firebase/ui/auth/AuthMethodPickerLayout.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ public AuthMethodPickerLayout.Builder setEmailButtonId(@IdRes int emailButton) {
135135
return this;
136136
}
137137

138+
/**
139+
* Set the ID of the Github sign in button in the custom layout.
140+
*/
141+
public AuthMethodPickerLayout.Builder setGithubButtonId(@IdRes int githubButton) {
142+
providersMapping.put(GithubAuthProvider.PROVIDER_ID, githubButton);
143+
return this;
144+
}
145+
138146
/**
139147
* Set the ID of the Phone Number sign in button in the custom layout.
140148
*/

0 commit comments

Comments
 (0)