-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring to properly support dark theme
- Loading branch information
1 parent
a0aeeab
commit 3626b50
Showing
17 changed files
with
185 additions
and
122 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
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,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:color="?colorControlHighlight"> | ||
<item android:drawable="@drawable/sdl_button_selector_dark" /> | ||
</ripple> |
5 changes: 5 additions & 0 deletions
5
library/src/main/res/drawable-v21/sdl_button_selector_dark.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_shortAnimTime"> | ||
<item android:drawable="@drawable/sdl_button_pressed_dark" android:state_pressed="true" /> | ||
<item android:drawable="@drawable/sdl_button_normal" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:color="?colorControlHighlight"> | ||
<item android:drawable="@drawable/sdl_list_selector_dark" /> | ||
</ripple> |
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,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_shortAnimTime"> | ||
<item android:drawable="@drawable/sdl_list_pressed_dark" android:state_pressed="true" /> | ||
<item android:drawable="@drawable/sdl_list_normal" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:exitFadeDuration="@android:integer/config_shortAnimTime" tools:ignore="UnusedAttribute"> | ||
<item android:drawable="@drawable/sdl_button_pressed_dark" android:state_pressed="true" /> | ||
<item android:drawable="@drawable/sdl_button_normal" /> | ||
</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
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<corners android:radius="2dp" /> | ||
<solid android:color="@color/sdl_pressed_dark" /> | ||
</shape> |
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,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:exitFadeDuration="@android:integer/config_shortAnimTime" tools:ignore="UnusedAttribute"> | ||
<item android:drawable="@drawable/sdl_list_pressed_dark" android:state_pressed="true" /> | ||
<item android:drawable="@drawable/sdl_list_normal" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/sdl_pressed" /> | ||
<solid android:color="@color/sdl_pressed_light" /> | ||
</shape> |
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,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/sdl_pressed_dark" /> | ||
</shape> |
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,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<style name="SDL.Dialog" parent="android:Theme.Material.Light.Dialog"> | ||
<item name="android:windowFrame">@null</item> | ||
<item name="android:windowIsFloating">true</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="android:windowContentOverlay">@null</item> | ||
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> | ||
<item name="android:windowActionBar">false</item> | ||
<item name="android:windowActionModeOverlay">true</item> | ||
<item name="android:windowCloseOnTouchOutside">true</item> | ||
<item name="android:colorAccent">?colorAccent</item> | ||
<item name="android:colorPrimary">?colorPrimary</item> | ||
|
||
<item name="sdlTextPrimaryColor">@color/sdl_text_primary_light</item> | ||
<item name="sdlTextSecondaryColor">@color/sdl_text_secondary_light</item> | ||
<item name="sdlDividerColor">@color/sdl_divider_light</item> | ||
<item name="sdlPressedColor">@color/sdl_pressed_light</item> | ||
<item name="sdlButtonBackground">@drawable/sdl_button</item> | ||
<item name="sdlListSelector">@drawable/sdl_list</item> | ||
</style> | ||
|
||
<style name="SDL.Dialog.Dark" parent="android:Theme.Material.Dialog"> | ||
<item name="android:windowFrame">@null</item> | ||
<item name="android:windowIsFloating">true</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="android:windowContentOverlay">@null</item> | ||
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> | ||
<item name="android:windowActionBar">false</item> | ||
<item name="android:windowActionModeOverlay">true</item> | ||
<item name="android:windowCloseOnTouchOutside">true</item> | ||
<item name="android:colorAccent">?colorAccent</item> | ||
<item name="android:colorPrimary">?colorPrimary</item> | ||
|
||
<item name="sdlTextPrimaryColor">@color/sdl_text_primary_dark</item> | ||
<item name="sdlTextSecondaryColor">@color/sdl_text_secondary_dark</item> | ||
<item name="sdlDividerColor">@color/sdl_divider_dark</item> | ||
<item name="sdlPressedColor">@color/sdl_pressed_dark</item> | ||
<item name="sdlButtonBackground">@drawable/sdl_button_dark</item> | ||
<item name="sdlListSelector">@drawable/sdl_list_dark</item> | ||
</style> | ||
</resources> |
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,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<declare-styleable name="StyledDialogs"> | ||
<attr name="sdlTextPrimaryColor" format="color|reference" /> | ||
<attr name="sdlTextSecondaryColor" format="color|reference" /> | ||
<attr name="sdlDividerColor" format="color|reference" /> | ||
<attr name="sdlPressedColor" format="color|reference" /> | ||
<attr name="sdlButtonBackground" format="reference" /> | ||
<attr name="sdlListSelector" format="reference" /> | ||
</declare-styleable> | ||
</resources> |
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,12 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<!-- Material colors --> | ||
<color name="sdl_text_primary">#DE000000</color> | ||
<!-- 87% --> | ||
<color name="sdl_text_secondary">#8A000000</color> | ||
<!-- 54% --> | ||
<color name="sdl_divider">#1F000000</color> | ||
<!-- 12% --> | ||
<color name="sdl_pressed">#D5D5D5</color> | ||
<color name="sdl_textColor_primary_dark">#FFFFFFFF</color> | ||
<!-- colors taken from: http://www.google.com/design/spec/style/color.html#color-ui-color-application --> | ||
<!-- 87% black --> | ||
<color name="sdl_text_primary_light">#DE000000</color> | ||
<!-- 100% white --> | ||
<color name="sdl_text_primary_dark">#FFFFFFFF</color> | ||
<!-- 54% black--> | ||
<color name="sdl_text_secondary_light">#8A000000</color> | ||
<!-- 70% white --> | ||
<color name="sdl_text_secondary_dark">#B3FFFFFF</color> | ||
<!-- 12 % black --> | ||
<color name="sdl_divider_light">#1F000000</color> | ||
<!-- 12 % white --> | ||
<color name="sdl_divider_dark">#1FFFFFFF</color> | ||
<!-- 16 % black --> | ||
<color name="sdl_pressed_light">#29000000</color> | ||
<!-- 16 % white --> | ||
<color name="sdl_pressed_dark">#29FFFFFF</color> | ||
</resources> |
Oops, something went wrong.