-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(UI): migrate to Material Design 3 (#91)
* feat(UI): migrate to Material Design 3 * feat(UI): migrate to Material Design 3 * feat(UI): migrate to Material Design 3 * feat(UI): migrate to Material Design 3 * feat(UI): migrate to Material Design 3 * feat(UI): migrate to Material Design 3 * feat(UI): migrate to Material Design 3 * feat(UI): migrate to Material Design 3
- Loading branch information
Showing
22 changed files
with
207 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size=2 | ||
end_of_line=lf | ||
charset=utf-8 | ||
trim_trailing_whitespace=true | ||
insert_final_newline=true | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{kt,kts}] | ||
ij_kotlin_imports_layout=* | ||
ij_kotlin_imports_layout = * | ||
|
||
[*.xml] | ||
indent_size = 4 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
12 changes: 12 additions & 0 deletions
12
core-ui/src/main/java/com/hoc/flowmvi/core_ui/ContextExtensions.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,12 @@ | ||
package com.hoc.flowmvi.core_ui | ||
|
||
import android.content.Context | ||
import android.widget.Toast | ||
import androidx.annotation.Px | ||
|
||
@Suppress("NOTHING_TO_INLINE") | ||
inline fun Context.toast(text: CharSequence) = Toast.makeText(this, text, Toast.LENGTH_SHORT).show() | ||
|
||
@Px | ||
@Suppress("NOTHING_TO_INLINE") | ||
inline fun Context.dpToPx(dp: Float): Int = (dp * resources.displayMetrics.density).toInt() |
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,31 @@ | ||
<resources> | ||
|
||
<style name="AppTheme" parent="Theme.Material3.DayNight"> | ||
<item name="colorPrimary">@color/md_theme_dark_primary</item> | ||
<item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item> | ||
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item> | ||
<item name="colorOnPrimaryContainer">@color/md_theme_dark_onPrimaryContainer</item> | ||
<item name="colorSecondary">@color/md_theme_dark_secondary</item> | ||
<item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item> | ||
<item name="colorSecondaryContainer">@color/md_theme_dark_secondaryContainer</item> | ||
<item name="colorOnSecondaryContainer">@color/md_theme_dark_onSecondaryContainer</item> | ||
<item name="colorTertiary">@color/md_theme_dark_tertiary</item> | ||
<item name="colorOnTertiary">@color/md_theme_dark_onTertiary</item> | ||
<item name="colorTertiaryContainer">@color/md_theme_dark_tertiaryContainer</item> | ||
<item name="colorOnTertiaryContainer">@color/md_theme_dark_onTertiaryContainer</item> | ||
<item name="colorError">@color/md_theme_dark_error</item> | ||
<item name="colorErrorContainer">@color/md_theme_dark_errorContainer</item> | ||
<item name="colorOnError">@color/md_theme_dark_onError</item> | ||
<item name="colorOnErrorContainer">@color/md_theme_dark_onErrorContainer</item> | ||
<item name="android:colorBackground">@color/md_theme_dark_background</item> | ||
<item name="colorOnBackground">@color/md_theme_dark_onBackground</item> | ||
<item name="colorSurface">@color/md_theme_dark_surface</item> | ||
<item name="colorOnSurface">@color/md_theme_dark_onSurface</item> | ||
<item name="colorSurfaceVariant">@color/md_theme_dark_surfaceVariant</item> | ||
<item name="colorOnSurfaceVariant">@color/md_theme_dark_onSurfaceVariant</item> | ||
<item name="colorOutline">@color/md_theme_dark_outline</item> | ||
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item> | ||
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item> | ||
<item name="colorPrimaryInverse">@color/md_theme_dark_primaryInverse</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,58 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#6200EE</color> | ||
<color name="colorPrimaryDark">#3700B3</color> | ||
<color name="colorAccent">#03DAC5</color> | ||
<color name="md_theme_light_primary">#6750A4</color> | ||
<color name="md_theme_light_onPrimary">#FFFFFF</color> | ||
<color name="md_theme_light_primaryContainer">#EADDFF</color> | ||
<color name="md_theme_light_onPrimaryContainer">#21005D</color> | ||
<color name="md_theme_light_secondary">#625B71</color> | ||
<color name="md_theme_light_onSecondary">#FFFFFF</color> | ||
<color name="md_theme_light_secondaryContainer">#E8DEF8</color> | ||
<color name="md_theme_light_onSecondaryContainer">#1D192B</color> | ||
<color name="md_theme_light_tertiary">#7D5260</color> | ||
<color name="md_theme_light_onTertiary">#FFFFFF</color> | ||
<color name="md_theme_light_tertiaryContainer">#FFD8E4</color> | ||
<color name="md_theme_light_onTertiaryContainer">#31111D</color> | ||
<color name="md_theme_light_error">#B3261E</color> | ||
<color name="md_theme_light_errorContainer">#F9DEDC</color> | ||
<color name="md_theme_light_onError">#FFFFFF</color> | ||
<color name="md_theme_light_onErrorContainer">#410E0B</color> | ||
<color name="md_theme_light_background">#FFFBFE</color> | ||
<color name="md_theme_light_onBackground">#1C1B1F</color> | ||
<color name="md_theme_light_surface">#FFFBFE</color> | ||
<color name="md_theme_light_onSurface">#1C1B1F</color> | ||
<color name="md_theme_light_surfaceVariant">#E7E0EC</color> | ||
<color name="md_theme_light_onSurfaceVariant">#49454F</color> | ||
<color name="md_theme_light_outline">#9A989C</color> | ||
<color name="md_theme_light_inverseOnSurface">#F4EFF4</color> | ||
<color name="md_theme_light_inverseSurface">#313033</color> | ||
<color name="md_theme_light_primaryInverse">#D0BCFF</color> | ||
|
||
<color name="md_theme_dark_primary">#D0BCFF</color> | ||
<color name="md_theme_dark_onPrimary">#381E72</color> | ||
<color name="md_theme_dark_primaryContainer">#4F378B</color> | ||
<color name="md_theme_dark_onPrimaryContainer">#EADDFF</color> | ||
<color name="md_theme_dark_secondary">#CCC2DC</color> | ||
<color name="md_theme_dark_onSecondary">#332D41</color> | ||
<color name="md_theme_dark_secondaryContainer">#4A4458</color> | ||
<color name="md_theme_dark_onSecondaryContainer">#E8DEF8</color> | ||
<color name="md_theme_dark_tertiary">#EFB8C8</color> | ||
<color name="md_theme_dark_onTertiary">#492532</color> | ||
<color name="md_theme_dark_tertiaryContainer">#633B48</color> | ||
<color name="md_theme_dark_onTertiaryContainer">#FFD8E4</color> | ||
<color name="md_theme_dark_error">#F2B8B5</color> | ||
<color name="md_theme_dark_errorContainer">#8C1D18</color> | ||
<color name="md_theme_dark_onError">#601410</color> | ||
<color name="md_theme_dark_onErrorContainer">#F9DEDC</color> | ||
<color name="md_theme_dark_background">#1C1B1F</color> | ||
<color name="md_theme_dark_onBackground">#E6E1E5</color> | ||
<color name="md_theme_dark_surface">#1C1B1F</color> | ||
<color name="md_theme_dark_onSurface">#E6E1E5</color> | ||
<color name="md_theme_dark_surfaceVariant">#49454F</color> | ||
<color name="md_theme_dark_onSurfaceVariant">#CAC4D0</color> | ||
<color name="md_theme_dark_outline">#6D6775</color> | ||
<color name="md_theme_dark_inverseOnSurface">#1C1B1F</color> | ||
<color name="md_theme_dark_inverseSurface">#E6E1E5</color> | ||
<color name="md_theme_dark_primaryInverse">#6750A4</color> | ||
<color name="seed">#6750A4</color> | ||
<color name="error">#B3261E</color> | ||
<color name="swipe_to_delete_background_color">#f44336</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,11 +1 @@ | ||
<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> | ||
|
||
</resources> | ||
<resources /> |
Oops, something went wrong.