Commit 4d1320b
committed
feat: Add screen color picker and update dependencies (close #4)
This commit introduces a screen color picker in the settings and updates several dependencies.
Key changes:
- **Screen Color Picker**:
- Added a color picker dialog to `SettingsFragment` allowing users to select the screen light color.
- The selected color is saved in preferences and used for the screen light in `MainActivity`.
- Added `editTextScreenColor` to `fragment_settings.xml` for displaying and selecting the screen color.
- Updated `SettingsViewModel` to include `screenColor` LiveData.
- Updated `Misc.kt` to handle color hex string to color integer conversion and validation.
- Updated `SOSFlashlightApp` to store `defaultScreenColor`.
- Updated `PreferenceKeyConst.kt` and `PreferenceValueConst.kt` with constants for screen color.
- **Dependency Updates**:
- Added `colorpicker-compose`, `androidx.ui.android`, and `androidx.foundation.android` dependencies.
- Updated `agp`, `foundationAndroid`, `fragmentKtx`, `kotlin`, `coreKtx`, `appcompat`, `material`, `constraintlayout`, `navigationFragmentKtx`, `navigationUiKtx`, `lifecycleViewmodelAndroid`, and `uiAndroid` versions in `gradle/libs.versions.toml`.
- Enabled Compose in `app/build.gradle.kts`.
- **Testing**:
- Added `MiscTest.kt` with tests for color conversion.
- Updated `ExampleInstrumentedTest.kt` package name.
- **IDE Configuration**:
- Removed various `.idea` configuration files.1 parent 24128c6 commit 4d1320b
26 files changed
Lines changed: 197 additions & 139 deletions
File tree
- .idea
- dictionaries
- app
- src
- androidTest/java/org/wbftw/weil/sos_flashlight
- main
- java/org/wbftw/weil/sos_flashlight
- config
- ui
- activity
- fragment
- viewmodel
- utils
- res/layout
- gradle
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments