Files
quik/presentation/src/main/res/layout/hsv_picker_view.xml
T
2020-01-12 20:50:55 -05:00

104 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2019 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:parentTag="com.moez.QKSMS.feature.themepicker.HSVPickerView">
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/rounded_rectangle_4dp"
android:backgroundTint="@color/white"
app:layout_constraintBottom_toBottomOf="@id/saturation"
app:layout_constraintEnd_toEndOf="@id/saturation"
app:layout_constraintStart_toStartOf="@id/saturation"
app:layout_constraintTop_toTopOf="@id/saturation" />
<View
android:id="@+id/saturation"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="24dp"
android:background="@drawable/color_picker_gradient"
app:layout_constraintDimensionRatio="1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:backgroundTint="@color/tools_theme" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/color_picker_gradient"
android:rotation="90"
app:layout_constraintBottom_toBottomOf="@id/saturation"
app:layout_constraintEnd_toEndOf="@id/saturation"
app:layout_constraintStart_toStartOf="@id/saturation"
app:layout_constraintTop_toTopOf="@id/saturation" />
<ImageView
android:id="@+id/swatch"
android:layout_width="16dp"
android:layout_height="16dp"
android:background="@drawable/circle"
android:elevation="4dp"
android:padding="2dp"
android:src="@drawable/circle"
tools:tint="@color/tools_theme"
tools:translationX="240dp"
tools:translationY="120dp" />
<FrameLayout
android:id="@+id/hueGroup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:paddingStart="24dp"
android:paddingTop="16dp"
android:paddingEnd="24dp"
android:paddingBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/saturation">
<ImageView
android:id="@+id/hueTrack"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_gravity="center_vertical"
android:background="@drawable/rounded_rectangle_2dp" />
<View
android:id="@+id/hueThumb"
android:layout_width="16dp"
android:layout_height="16dp"
android:background="@drawable/circle"
android:elevation="4dp"
tools:tint="@color/tools_theme" />
</FrameLayout>
</merge>