Skip to content

Commit 4d1320b

Browse files
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

.idea/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.idea/AndroidProjectSystem.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/active-tab-highlighter.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.idea/compiler.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/deploymentTargetSelector.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.idea/deviceManager.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.idea/dictionaries/project.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.idea/gradle.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.idea/migrations.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)