-
Notifications
You must be signed in to change notification settings - Fork 4
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 #13 from TradeMe/dark-mode
Add Dark Mode support to Konfigure-Android
- Loading branch information
Showing
21 changed files
with
87 additions
and
72 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
8 changes: 7 additions & 1 deletion
8
.../src/main/java/nz/co/trademe/konfigure/android/ui/adapter/viewholder/DividerViewHolder.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 |
---|---|---|
@@ -1,8 +1,14 @@ | ||
package nz.co.trademe.konfigure.android.ui.adapter.viewholder | ||
|
||
import android.view.ViewGroup | ||
import androidx.appcompat.content.res.AppCompatResources | ||
import nz.co.trademe.konfigure.android.R | ||
|
||
internal class DividerViewHolder( | ||
parent: ViewGroup | ||
) : BaseViewHolder(parent.inflate(R.layout.view_holder_divider)) | ||
) : BaseViewHolder(parent.inflate(R.layout.view_holder_divider)) { | ||
|
||
init { | ||
itemView.setBackgroundColor(AppCompatResources.getColorStateList(itemView.context, R.color.color_divider).defaultColor) | ||
} | ||
} |
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:alpha="0.18" android:color="?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
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<View xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="1dp" | ||
android:background="@color/black_18pc"/> | ||
android:layout_height="1dp"/> |
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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
<item | ||
android:id="@+id/action_search" | ||
android:icon="@drawable/ic_search_black_24dp" | ||
app:showAsAction="always|collapseActionView" | ||
android:title="@string/search" | ||
app:iconTint="?colorOnPrimarySurface" | ||
app:actionViewClass="androidx.appcompat.widget.SearchView" | ||
android:title="@string/search"/> | ||
app:showAsAction="always|collapseActionView" /> | ||
</menu> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<style name="ThemeOverlay.Konfigure.Toolbar.PrimarySurface" parent=""> | ||
<item name="colorControlNormal">?colorOnPrimarySurface</item> | ||
<item name="actionMenuTextColor">?colorOnPrimarySurface</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
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,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> | ||
<item name="colorPrimary">@color/purple_300</item> | ||
<item name="colorPrimaryDark">@color/purple_300_dark</item> | ||
<item name="colorAccent">@color/light_blue_200</item> | ||
<item name="android:statusBarColor" tools:targetApi="lollipop">?colorSurface</item> | ||
</style> | ||
|
||
<style name="AppTheme.NoActionBar"> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</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 |
---|---|---|
@@ -1,6 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#008577</color> | ||
<color name="colorPrimaryDark">#00574B</color> | ||
<color name="colorAccent">#D81B60</color> | ||
<!-- Light mode --> | ||
<color name="purple_600">#8e24aa</color> | ||
<color name="purple_600_dark">#5c007a</color> | ||
<color name="light_blue_500">#03a9f4</color> | ||
|
||
<!-- Dark mode --> | ||
<color name="purple_300">#ba68c8</color> | ||
<color name="purple_300_dark">#883997</color> | ||
<color name="light_blue_200">#81d4fa</color> | ||
|
||
</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,18 +1,14 @@ | ||
<resources> | ||
|
||
<!-- Base application theme. --> | ||
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> | ||
<!-- Customize your theme here. --> | ||
<item name="colorPrimary">@color/colorPrimary</item> | ||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
<item name="colorAccent">@color/colorAccent</item> | ||
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> | ||
<item name="colorPrimary">@color/purple_600</item> | ||
<item name="colorPrimaryDark">@color/purple_600_dark</item> | ||
<item name="colorAccent">@color/light_blue_500</item> | ||
</style> | ||
|
||
<style name="AppTheme.NoActionBar" parent="Theme.MaterialComponents.Light.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
<item name="colorPrimary">@color/colorPrimary</item> | ||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
<item name="colorAccent">@color/colorAccent</item> | ||
<style name="AppTheme.NoActionBar"> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</item> | ||
</style> | ||
|
||
</resources> |