Skip to content

Commit 202c56e

Browse files
SUPERCILEXsamtstern
authored andcommitted
Use vectors instead of pngs! (#459)
1 parent c52387e commit 202c56e

16 files changed

+60
-10
lines changed

app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ private List<IdpConfig> getSelectedProviders() {
280280
selectedProviders.add(new IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build());
281281
}
282282

283+
if (mUseTwitterProvider.isChecked()) {
284+
selectedProviders.add(new IdpConfig.Builder(AuthUI.TWITTER_PROVIDER).build());
285+
}
286+
283287
if (mUseFacebookProvider.isChecked()) {
284288
selectedProviders.add(
285289
new IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER)
@@ -294,10 +298,6 @@ private List<IdpConfig> getSelectedProviders() {
294298
.build());
295299
}
296300

297-
if (mUseTwitterProvider.isChecked()) {
298-
selectedProviders.add(new IdpConfig.Builder(AuthUI.TWITTER_PROVIDER).build());
299-
}
300-
301301
return selectedProviders;
302302
}
303303

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<vector
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="22dp"
4+
android:height="22dp"
5+
android:viewportHeight="266.895"
6+
android:viewportWidth="266.893">
7+
<path
8+
android:fillColor="#FFFFFF"
9+
android:pathData="M248.08,262.31c7.85,0 14.22,-6.37 14.22,-14.23V18.81c0,-7.86 -6.37,-14.22 -14.22,-14.22H18.81c-7.86,0 -14.22,6.37 -14.22,14.22v229.27c0,7.86 6.37,14.23 14.22,14.23H248.08z"/>
10+
<path
11+
android:fillColor="#3C5A99"
12+
android:pathData="M182.41,262.31v-99.8h33.5l5.02,-38.9h-38.51V98.78c0,-11.26 3.13,-18.93 19.27,-18.93l20.6,-0.01V45.04c-3.56,-0.47 -15.79,-1.53 -30.01,-1.53c-29.69,0 -50.03,18.13 -50.03,51.41v28.68h-33.58v38.9h33.58v99.8H182.41z"/>
13+
</vector>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<vector
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportHeight="512.0"
6+
android:viewportWidth="512.0">
7+
<path
8+
android:fillColor="#4285f4"
9+
android:pathData="M482.6,261.4c0,-16.7 -1.5,-32.8 -4.3,-48.3H256v91.3h127c-5.5,29.5 -22.1,54.5 -47.1,71.2v59.2h76.3c44.6,-41.1 70.4,-101.6 70.4,-173.5z"/>
10+
<path
11+
android:fillColor="#34a853"
12+
android:pathData="M256,492c63.7,0 117.1,-21.1 156.2,-57.2l-76.3,-59.2c-21.1,14.2 -48.2,22.5 -79.9,22.5 -61.5,0 -113.5,-41.5 -132.1,-97.3H45.1v61.2c38.8,77.1 118.6,130 210.9,130z"/>
13+
<path
14+
android:fillColor="#fbbc05"
15+
android:pathData="M123.9,300.8c-4.7,-14.2 -7.4,-29.3 -7.4,-44.8s2.7,-30.7 7.4,-44.8V150H45.1C29.1,181.9 20,217.9 20,256c0,38.1 9.1,74.1 25.1,106l78.8,-61.2z"/>
16+
<path
17+
android:fillColor="#ea4335"
18+
android:pathData="M256,113.9c34.7,0 65.8,11.9 90.2,35.3l67.7,-67.7C373,43.4 319.6,20 256,20c-92.3,0 -172.1,52.9 -210.9,130l78.8,61.2c18.6,-55.8 70.6,-97.3 132.1,-97.3z"/>
19+
</vector>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportHeight="24.0"
6+
android:viewportWidth="24.0">
7+
<path
8+
android:fillColor="#FFFFFF"
9+
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
10+
</vector>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="19dp"
5+
android:viewportHeight="244.18703"
6+
android:viewportWidth="300.00006">
7+
<path
8+
android:fillColor="#FFFFFF"
9+
android:pathData="m94.72,243.18c112.46,0 173.96,-93.17 173.96,-173.96 0,-2.65 -0.05,-5.28 -0.17,-7.9 11.94,-8.63 22.31,-19.4 30.5,-31.66 -10.95,4.87 -22.74,8.15 -35.11,9.63 12.62,-7.57 22.31,-19.54 26.89,-33.82 -11.81,7 -24.9,12.09 -38.82,14.84 -11.16,-11.88 -27.04,-19.32 -44.63,-19.32 -33.76,0 -61.14,27.38 -61.14,61.13 0,4.8 0.54,9.46 1.59,13.94 -50.81,-2.56 -95.87,-26.89 -126.03,-63.88 -5.25,9.04 -8.28,19.53 -8.28,30.73 0,21.21 10.79,39.94 27.21,50.89 -10.03,-0.31 -19.45,-3.06 -27.69,-7.65 -0.01,0.26 -0.01,0.51 -0.01,0.78 0,29.61 21.08,54.33 49.05,59.93 -5.14,1.4 -10.54,2.15 -16.12,2.15 -3.93,0 -7.77,-0.39 -11.49,-1.1 7.78,24.29 30.35,41.97 57.12,42.47 -20.93,16.4 -47.29,26.17 -75.94,26.17 -4.93,0 -9.8,-0.28 -14.58,-0.85 27.06,17.34 59.19,27.46 93.72,27.46"/>
10+
</vector>

auth/src/main/res/values/styles.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,28 +197,26 @@
197197
</style>
198198

199199
<style name="FirebaseUI.Button.AccountChooser.EmailButton">
200-
<item name="android:drawableLeft">@drawable/ic_email_white_18dp</item>
200+
<item name="android:drawableLeft">@drawable/ic_mail_white_24dp</item>
201201
<item name="android:visibility">gone</item>
202202
<item name="android:background">@drawable/idp_button_background_email</item>
203203
<item name="android:textColor">#ffffff</item>
204204
</style>
205205

206206
<style name="FirebaseUI.Button.AccountChooser.GoogleButton">
207-
<item name="android:drawableLeft">@drawable/logo_googleg_color_18dp</item>
207+
<item name="android:drawableLeft">@drawable/ic_googleg_color_24dp</item>
208208
<item name="android:background">@drawable/idp_button_background_google</item>
209209
<item name="android:textColor">#757575</item>
210210
</style>
211211

212212
<style name="FirebaseUI.Button.AccountChooser.FacebookButton">
213-
<item name="android:drawableLeft">@drawable/com_facebook_button_icon_white</item>
213+
<item name="android:drawableLeft">@drawable/ic_facebook_white_22dp</item>
214214
<item name="android:background">@drawable/idp_button_background_facebook</item>
215215
<item name="android:textColor">@color/com_facebook_button_text_color</item>
216216
</style>
217217

218218
<style name="FirebaseUI.Button.AccountChooser.TwitterButton">
219-
<item name="android:drawableLeft">@drawable/tw__ic_logo_default</item>
220-
<item name="android:paddingLeft">4dp</item>
221-
<item name="android:drawablePadding">8dp</item>
219+
<item name="android:drawableLeft">@drawable/ic_twitter_bird_white_24dp</item>
222220
<item name="android:background">@drawable/idp_button_background_twitter</item>
223221
<item name="android:textColor">@color/tw__solid_white</item>
224222
</style>

0 commit comments

Comments
 (0)