-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12425 from wordpress-mobile/issue/unified-login-s…
…ignup-theming-issues Unified Login & Sign-Up: Fix theming-related issues
- Loading branch information
Showing
14 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
WordPress/src/main/java/org/wordpress/android/ui/accounts/LoginFlowThemeHelper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.wordpress.android.ui.accounts | ||
|
||
import android.content.res.Resources | ||
import org.wordpress.android.R | ||
|
||
object LoginFlowThemeHelper { | ||
/** | ||
* This function should be used by activities that use the LoginFlow theme. | ||
* These activities often use components that refer to custom theme attributes defined by the WordPress theme, | ||
* but that are missing from the LoginFlow theme. Some examples: wpColorText, wpColorError, wpColorSuccess, etc. | ||
* Instead of extending the LoginFlow theme only to include these attributes and having to maintain them in multiple | ||
* places, we use this function to "inject" them directly. | ||
*/ | ||
@JvmStatic fun injectMissingCustomAttributes(theme: Resources.Theme) { | ||
theme.applyStyle(R.style.WordPress_NoActionBar, false) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportHeight="24.0" | ||
android:viewportWidth="24.0"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libs/login/WordPressLoginFlow/src/main/res/color/login_on_background_medium_selector.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:color="@color/material_on_background_disabled" android:state_enabled="false" /> | ||
<item android:color="@color/material_on_background_emphasis_medium" /> | ||
<item android:alpha="@dimen/material_emphasis_medium" android:color="?attr/colorOnBackground"/> | ||
</selector> |
2 changes: 1 addition & 1 deletion
2
libs/login/WordPressLoginFlow/src/main/res/color/login_on_surface_high_selector.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:color="@color/material_on_surface_disabled" android:state_enabled="false" /> | ||
<item android:color="@color/material_on_surface_emphasis_high_type" /> | ||
<item android:alpha="@dimen/material_emphasis_high_type" android:color="?attr/colorOnSurface" /> | ||
</selector> |
2 changes: 1 addition & 1 deletion
2
libs/login/WordPressLoginFlow/src/main/res/color/login_on_surface_medium_selector.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:color="@color/material_on_surface_disabled" android:state_enabled="false" /> | ||
<item android:color="@color/material_on_surface_emphasis_medium" /> | ||
<item android:alpha="@dimen/material_emphasis_medium" android:color="?attr/colorOnSurface"/> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters