mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-01-31 10:34:51 +01:00
use orange widget colors by default
This commit is contained in:
parent
40a5127d0d
commit
807bf5d4c1
@ -61,7 +61,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:e5a4973e6a'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:745f169a48'
|
||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import android.os.Bundle
|
||||
import android.widget.SeekBar
|
||||
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.DEFAULT_WIDGET_BG_COLOR
|
||||
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
||||
import com.simplemobiletools.flashlight.R
|
||||
import com.simplemobiletools.flashlight.extensions.config
|
||||
@ -44,11 +43,7 @@ class WidgetBrightDisplayConfigureActivity : SimpleActivity() {
|
||||
|
||||
private fun initVariables() {
|
||||
mWidgetColor = config.widgetBgColor
|
||||
mWidgetAlpha = if (mWidgetColor == DEFAULT_WIDGET_BG_COLOR) {
|
||||
1f
|
||||
} else {
|
||||
Color.alpha(mWidgetColor) / 255.toFloat()
|
||||
}
|
||||
mWidgetAlpha = Color.alpha(mWidgetColor) / 255.toFloat()
|
||||
|
||||
mWidgetColorWithoutTransparency = Color.rgb(Color.red(mWidgetColor), Color.green(mWidgetColor), Color.blue(mWidgetColor))
|
||||
config_widget_seekbar.setOnSeekBarChangeListener(seekbarChangeListener)
|
||||
|
@ -8,7 +8,6 @@ import android.os.Bundle
|
||||
import android.widget.SeekBar
|
||||
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.DEFAULT_WIDGET_BG_COLOR
|
||||
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
||||
import com.simplemobiletools.flashlight.R
|
||||
import com.simplemobiletools.flashlight.extensions.config
|
||||
@ -45,11 +44,7 @@ class WidgetTorchConfigureActivity : SimpleActivity() {
|
||||
|
||||
private fun initVariables() {
|
||||
mWidgetColor = config.widgetBgColor
|
||||
mWidgetAlpha = if (mWidgetColor == DEFAULT_WIDGET_BG_COLOR) {
|
||||
1f
|
||||
} else {
|
||||
Color.alpha(mWidgetColor) / 255.toFloat()
|
||||
}
|
||||
mWidgetAlpha = Color.alpha(mWidgetColor) / 255.toFloat()
|
||||
|
||||
mWidgetColorWithoutTransparency = Color.rgb(Color.red(mWidgetColor), Color.green(mWidgetColor), Color.blue(mWidgetColor))
|
||||
config_widget_seekbar.setOnSeekBarChangeListener(seekbarChangeListener)
|
||||
|
@ -2,5 +2,4 @@
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/bright_display_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
@ -2,5 +2,4 @@
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/flashlight_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
4
app/src/main/res/values/integers.xml
Normal file
4
app/src/main/res/values/integers.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="default_widget_bg_color">-571114496</integer> <!-- #DDF57C00 -->
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user