渐变像素对话框调试完成。
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue Dec 16 09:10:00 GMT 2025
|
||||
#Tue Dec 16 09:46:41 GMT 2025
|
||||
stageCount=7
|
||||
libraryProject=
|
||||
baseVersion=15.14
|
||||
publishVersion=15.14.6
|
||||
buildCount=48
|
||||
buildCount=52
|
||||
baseBetaVersion=15.14.7
|
||||
|
||||
@@ -68,6 +68,7 @@ public class ColorPaletteDialog extends Dialog implements View.OnClickListener,
|
||||
|
||||
// 控件引用(新增透明度进度条+文本)
|
||||
private ImageView ivColorPicker; // 颜色预览拾取框
|
||||
private ImageView ivColorScaler; // 颜色渐变拾取框
|
||||
private EditText etR; // R分量输入框(显示实时调节值)
|
||||
private EditText etG; // G分量输入框(显示实时调节值)
|
||||
private EditText etB; // B分量输入框(显示实时调节值)
|
||||
@@ -145,6 +146,7 @@ public class ColorPaletteDialog extends Dialog implements View.OnClickListener,
|
||||
*/
|
||||
private void initViewBind(View view) {
|
||||
ivColorPicker = view.findViewById(R.id.iv_color_picker);
|
||||
ivColorScaler = view.findViewById(R.id.iv_color_scaler);
|
||||
etR = view.findViewById(R.id.et_r);
|
||||
etG = view.findViewById(R.id.et_g);
|
||||
etB = view.findViewById(R.id.et_b);
|
||||
@@ -158,7 +160,7 @@ public class ColorPaletteDialog extends Dialog implements View.OnClickListener,
|
||||
tvCancel = view.findViewById(R.id.tv_cancel);
|
||||
|
||||
// 控件非空校验(小米低版本容错,绑定失败直接关闭对话框)
|
||||
if (ivColorPicker == null || etR == null || etG == null || etB == null || etColorValue == null
|
||||
if (ivColorPicker == null || ivColorScaler == null || etR == null || etG == null || etB == null || etColorValue == null
|
||||
|| sbAlpha == null || tvAlphaValue == null
|
||||
|| tvBrightnessMinus == null || tvBrightnessValue == null || tvBrightnessPlus == null
|
||||
|| tvConfirm == null || tvCancel == null) {
|
||||
@@ -201,6 +203,7 @@ public class ColorPaletteDialog extends Dialog implements View.OnClickListener,
|
||||
private void initListener() {
|
||||
// 点击监听(按钮+颜色拾取框)
|
||||
ivColorPicker.setOnClickListener(this);
|
||||
ivColorScaler.setOnClickListener(this);
|
||||
tvConfirm.setOnClickListener(this);
|
||||
tvCancel.setOnClickListener(this);
|
||||
tvBrightnessMinus.setOnClickListener(this);
|
||||
@@ -657,13 +660,14 @@ public class ColorPaletteDialog extends Dialog implements View.OnClickListener,
|
||||
// ====================== 点击事件实现(统一处理,逻辑清晰) ======================
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//ToastUtils.show("onClick");
|
||||
int id = v.getId();
|
||||
// 关键:所有点击事件均加判断(避免并发冲突/重复触发)
|
||||
if (!isAppSelfUpdatingColor) {
|
||||
if (id == R.id.iv_color_picker) {
|
||||
showSystemColorPicker(); // 打开系统颜色选择器
|
||||
} if (id == R.id.iv_color_scale) {
|
||||
ToastUtils.show("iv_color_scale");
|
||||
} if (id == R.id.iv_color_scaler) {
|
||||
//ToastUtils.show("iv_color_scale");
|
||||
openColorPickerDialog(mCurrentColor); // 打开系统颜色选择器
|
||||
} else if (id == R.id.tv_confirm) {
|
||||
mListener.onColorSelected(mCurrentColor); // 确认选择,回调颜色
|
||||
@@ -682,7 +686,7 @@ public class ColorPaletteDialog extends Dialog implements View.OnClickListener,
|
||||
|
||||
|
||||
void openColorPickerDialog(int nColor){
|
||||
ToastUtils.show("openColorPickerDialog");
|
||||
//ToastUtils.show("openColorPickerDialog");
|
||||
ColorPickerDialog dlg = new ColorPickerDialog(getContext(), nColor);
|
||||
dlg.setOnColorChangedListener(new com.a4455jkjh.colorpicker.view.OnColorChangedListener() {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:focusable="true"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_color_scale"
|
||||
android:id="@+id/iv_color_scaler"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:clickable="true"
|
||||
|
||||
Reference in New Issue
Block a user