add a white stroke to the color picker at widget config

This commit is contained in:
tibbi 2018-05-22 10:22:55 +02:00
parent 26c62156a6
commit 6fa76a85ec
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import android.widget.SeekBar
import com.simplemobiletools.commons.dialogs.ColorPickerDialog import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.adjustAlpha import com.simplemobiletools.commons.extensions.adjustAlpha
import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.setFillWithStroke
import com.simplemobiletools.flashlight.R import com.simplemobiletools.flashlight.R
import com.simplemobiletools.flashlight.extensions.config import com.simplemobiletools.flashlight.extensions.config
import com.simplemobiletools.flashlight.helpers.MyWidgetProvider import com.simplemobiletools.flashlight.helpers.MyWidgetProvider
@ -82,7 +83,7 @@ class WidgetConfigureActivity : SimpleActivity() {
private fun updateColors() { private fun updateColors() {
mWidgetColor = mWidgetColorWithoutTransparency.adjustAlpha(mWidgetAlpha) mWidgetColor = mWidgetColorWithoutTransparency.adjustAlpha(mWidgetAlpha)
config_widget_color.setBackgroundColor(mWidgetColor) config_widget_color.setFillWithStroke(mWidgetColor, Color.BLACK)
config_image.background.mutate().applyColorFilter(mWidgetColor) config_image.background.mutate().applyColorFilter(mWidgetColor)
} }

View File

@ -21,7 +21,7 @@
android:background="@drawable/circles_big"/> android:background="@drawable/circles_big"/>
</RelativeLayout> </RelativeLayout>
<Button <ImageView
android:id="@+id/config_widget_color" android:id="@+id/config_widget_color"
android:layout_width="@dimen/widget_colorpicker_size" android:layout_width="@dimen/widget_colorpicker_size"
android:layout_height="@dimen/widget_colorpicker_size" android:layout_height="@dimen/widget_colorpicker_size"