Move style for social login to a dedicated file

This commit is contained in:
Benoit Marty 2020-12-14 15:53:16 +01:00
parent c8c4e10822
commit 5a69b33600
2 changed files with 102 additions and 98 deletions

View file

@ -370,103 +370,5 @@
<item name="android:background">@drawable/vector_tabbar_background</item> <item name="android:background">@drawable/vector_tabbar_background</item>
<item name="background">@drawable/vector_tabbar_background</item> <item name="background">@drawable/vector_tabbar_background</item>
</style> </style>
<style name="WidgetButtonSocialLogin" parent="Widget.MaterialComponents.Button">
<item name="android:textAllCaps">false</item>
<item name="fontFamily">sans-serif-medium</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="iconGravity">start</item>
<item name="android:textSize">14sp</item>
<item name="android:textAlignment">textStart</item>
<item name="android:paddingStart">2dp</item>
<item name="android:paddingEnd">8dp</item>
<item name="android:clipToPadding">false</item>
</style>
<style name="WidgetButtonSocialLogin.Google">
<item name="icon">@drawable/ic_social_google</item>
<item name="iconTint">@android:color/transparent</item>
<item name="iconTintMode">add</item>
</style>
<style name="WidgetButtonSocialLogin.Google.Light">
<item name="android:backgroundTint">@color/button_social_google_background_selector_light</item>
<item name="android:textColor">@color/black_54</item>
</style>
<style name="WidgetButtonSocialLogin.Google.Dark" >
<item name="android:backgroundTint">@color/button_social_google_background_selector_dark</item>
<item name="android:textColor">@color/white</item>
</style>
<style name="WidgetButtonSocialLogin.Github" parent="WidgetButtonSocialLogin">
<item name="icon">@drawable/ic_social_github</item>
</style>
<style name="WidgetButtonSocialLogin.Github.Light">
<item name="iconTint">@android:color/black</item>
<item name="android:textColor">@color/black</item>
<item name="android:backgroundTint">@color/white</item>
</style>
<style name="WidgetButtonSocialLogin.Github.Dark" >
<item name="iconTint">@android:color/white</item>
<item name="android:textColor">@color/white</item>
<item name="android:backgroundTint">@color/black</item>
</style>
<style name="WidgetButtonSocialLogin.Facebook" parent="WidgetButtonSocialLogin">
<item name="icon">@drawable/ic_social_facebook</item>
</style>
<style name="WidgetButtonSocialLogin.Facebook.Light">
<item name="strokeColor">#3877EA</item>
<item name="strokeWidth">1dp</item>
<item name="iconTint">#3877EA</item>
<item name="android:textColor">#3877EA</item>
<item name="android:backgroundTint">@color/white</item>
</style>
<style name="WidgetButtonSocialLogin.Facebook.Dark" >
<item name="iconTint">@android:color/white</item>
<item name="android:textColor">@color/white</item>
<item name="android:backgroundTint">#3877EA</item>
</style>
<style name="WidgetButtonSocialLogin.Twitter" parent="WidgetButtonSocialLogin">
<item name="icon">@drawable/ic_social_twitter</item>
</style>
<style name="WidgetButtonSocialLogin.Twitter.Light" >
<item name="iconTint">#5D9EC9</item>
<item name="android:textColor">#5D9EC9</item>
<item name="android:backgroundTint">@color/white</item>
</style>
<style name="WidgetButtonSocialLogin.Twitter.Dark">
<item name="iconTint">@color/white</item>
<item name="android:textColor">@color/white</item>
<item name="android:backgroundTint">#5D9EC9</item>
</style>
<style name="WidgetButtonSocialLogin.Apple" parent="WidgetButtonSocialLogin">
<item name="icon">@drawable/ic_social_apple</item>
</style>
<style name="WidgetButtonSocialLogin.Apple.Light" >
<item name="iconTint">@color/white</item>
<item name="android:textColor">@color/white</item>
<item name="android:backgroundTint">@color/black</item>
</style>
<style name="WidgetButtonSocialLogin.Apple.Dark">
<item name="iconTint">@color/black</item>
<item name="android:textColor">@color/black</item>
<item name="android:backgroundTint">@color/white</item>
</style>
</resources> </resources>

View file

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="WidgetButtonSocialLogin" parent="Widget.MaterialComponents.Button">
<item name="android:textAllCaps">false</item>
<item name="fontFamily">sans-serif-medium</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="iconGravity">start</item>
<item name="android:textSize">14sp</item>
<item name="android:textAlignment">textStart</item>
<item name="android:paddingStart">2dp</item>
<item name="android:paddingEnd">8dp</item>
<item name="android:clipToPadding">false</item>
</style>
<style name="WidgetButtonSocialLogin.Google">
<item name="icon">@drawable/ic_social_google</item>
<item name="iconTint">@android:color/transparent</item>
<item name="iconTintMode">add</item>
</style>
<style name="WidgetButtonSocialLogin.Google.Light">
<item name="android:backgroundTint">@color/button_social_google_background_selector_light</item>
<item name="android:textColor">@color/black_54</item>
</style>
<style name="WidgetButtonSocialLogin.Google.Dark">
<item name="android:backgroundTint">@color/button_social_google_background_selector_dark</item>
<item name="android:textColor">@color/white</item>
</style>
<style name="WidgetButtonSocialLogin.Github" parent="WidgetButtonSocialLogin">
<item name="icon">@drawable/ic_social_github</item>
</style>
<style name="WidgetButtonSocialLogin.Github.Light">
<item name="iconTint">@android:color/black</item>
<item name="android:textColor">@color/black</item>
<item name="android:backgroundTint">@color/white</item>
</style>
<style name="WidgetButtonSocialLogin.Github.Dark">
<item name="iconTint">@android:color/white</item>
<item name="android:textColor">@color/white</item>
<item name="android:backgroundTint">@color/black</item>
</style>
<style name="WidgetButtonSocialLogin.Facebook" parent="WidgetButtonSocialLogin">
<item name="icon">@drawable/ic_social_facebook</item>
</style>
<style name="WidgetButtonSocialLogin.Facebook.Light">
<item name="strokeColor">#3877EA</item>
<item name="strokeWidth">1dp</item>
<item name="iconTint">#3877EA</item>
<item name="android:textColor">#3877EA</item>
<item name="android:backgroundTint">@color/white</item>
</style>
<style name="WidgetButtonSocialLogin.Facebook.Dark">
<item name="iconTint">@android:color/white</item>
<item name="android:textColor">@color/white</item>
<item name="android:backgroundTint">#3877EA</item>
</style>
<style name="WidgetButtonSocialLogin.Twitter" parent="WidgetButtonSocialLogin">
<item name="icon">@drawable/ic_social_twitter</item>
</style>
<style name="WidgetButtonSocialLogin.Twitter.Light">
<item name="iconTint">#5D9EC9</item>
<item name="android:textColor">#5D9EC9</item>
<item name="android:backgroundTint">@color/white</item>
</style>
<style name="WidgetButtonSocialLogin.Twitter.Dark">
<item name="iconTint">@color/white</item>
<item name="android:textColor">@color/white</item>
<item name="android:backgroundTint">#5D9EC9</item>
</style>
<style name="WidgetButtonSocialLogin.Apple" parent="WidgetButtonSocialLogin">
<item name="icon">@drawable/ic_social_apple</item>
</style>
<style name="WidgetButtonSocialLogin.Apple.Light">
<item name="iconTint">@color/white</item>
<item name="android:textColor">@color/white</item>
<item name="android:backgroundTint">@color/black</item>
</style>
<style name="WidgetButtonSocialLogin.Apple.Dark">
<item name="iconTint">@color/black</item>
<item name="android:textColor">@color/black</item>
<item name="android:backgroundTint">@color/white</item>
</style>
</resources>