QuadFlask / colorpicker

🍭color picker for android
1.22k stars 219 forks source link

Support horizontal layout in dialog #70

Open QuadFlask opened 7 years ago

TsaiYongChuan commented 4 years ago

<com.flask.colorpicker.ColorPickerView android:id="@+id/color_picker_view" android:layout_width="0dp" android:layout_height="0dp" app:alphaSlider="true" app:layout_constraintDimensionRatio="1:1" app:density="12" app:layout_constraintBottom_toTopOf="@+id/home_bt_color" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/home_change" app:lightnessSlider="true" app:lightnessSliderView="@+id/v_lightness_slider" app:wheelType="CIRCLE" bind:visibility="@{!vm.changeDish}" />

you cen set app:layout_constraintDimensionRatio="1:1" in the ConstraintLayout