0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-26 21:13:01 +00:00

Changed RGB wheel to HSL

This commit is contained in:
X1nto 2020-12-15 12:23:27 +04:00
parent 15b289e83e
commit 8bd9f17e20
4 changed files with 33 additions and 3 deletions

View file

@ -83,6 +83,10 @@ class ManagerAccentColorDialog : BindingDialogFragment<DialogManagerAccentColorB
}) })
} }
accentCancel.setOnClickListener {
mutableAccentColor.value = accent
dismiss()
}
accentSave.setOnClickListener { accentSave.setOnClickListener {
try { try {
val colorFromEditText = Color.parseColor(hexEdittext.text.toString()) val colorFromEditText = Color.parseColor(hexEdittext.text.toString())

View 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>

View file

@ -1,21 +1,37 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android" 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"> 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 <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="8dp"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:text="@string/accent_color" android:text="@string/accent_color"
style="@style/BottomDialogCardTitle" /> style="@style/BottomDialogCardTitle" />
<com.madrapps.pikolo.RGBColorPicker <com.madrapps.pikolo.HSLColorPicker
android:id="@+id/accent_picker" android:id="@+id/accent_picker"
android:layout_width="match_parent" 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 <com.google.android.material.textfield.TextInputEditText
android:id="@+id/hex_edittext" android:id="@+id/hex_edittext"

View file

@ -38,7 +38,7 @@
app:layout_constraintTop_toBottomOf="@id/app_checkbox_text" app:layout_constraintTop_toBottomOf="@id/app_checkbox_text"
tools:text="YouTube Vanced is the stock Android YouTube App, but better!" /> 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:id="@+id/app_checkbox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"