mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-23 03:35:11 +00:00
Changed RGB wheel to HSL
This commit is contained in:
parent
15b289e83e
commit
8bd9f17e20
4 changed files with 33 additions and 3 deletions
|
@ -83,6 +83,10 @@ class ManagerAccentColorDialog : BindingDialogFragment<DialogManagerAccentColorB
|
|||
|
||||
})
|
||||
}
|
||||
accentCancel.setOnClickListener {
|
||||
mutableAccentColor.value = accent
|
||||
dismiss()
|
||||
}
|
||||
accentSave.setOnClickListener {
|
||||
try {
|
||||
val colorFromEditText = Color.parseColor(hexEdittext.text.toString())
|
||||
|
|
10
app/src/main/res/drawable/ic_baseline_close_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_close_24.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||
</vector>
|
|
@ -1,21 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:contentPaddingLeft="0dp"
|
||||
app:contentPaddingRight="0dp"
|
||||
style="@style/BottomDialogCard">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/accent_cancel"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_baseline_close_24"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_gravity="end"
|
||||
android:background="@android:color/transparent"
|
||||
android:tint="?colorSettingsTitle"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/accent_color"
|
||||
style="@style/BottomDialogCardTitle" />
|
||||
|
||||
<com.madrapps.pikolo.RGBColorPicker
|
||||
<com.madrapps.pikolo.HSLColorPicker
|
||||
android:id="@+id/accent_picker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="350dp" />
|
||||
android:layout_height="350dp"
|
||||
app:lightness_radius_offset="40dp"
|
||||
app:saturation_radius_offset="40dp"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/hex_edittext"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/app_checkbox_text"
|
||||
tools:text="YouTube Vanced is the stock Android YouTube App, but better!" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
<com.vanced.manager.ui.core.ThemedMaterialCheckbox
|
||||
android:id="@+id/app_checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
Loading…
Reference in a new issue