20251216_171108_907
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Dec 16 08:20:17 GMT 2025
|
#Tue Dec 16 09:10:00 GMT 2025
|
||||||
stageCount=7
|
stageCount=7
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.14
|
baseVersion=15.14
|
||||||
publishVersion=15.14.6
|
publishVersion=15.14.6
|
||||||
buildCount=45
|
buildCount=48
|
||||||
baseBetaVersion=15.14.7
|
baseBetaVersion=15.14.7
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import cc.winboll.studio.powerbell.utils.FileUtils;
|
|||||||
import cc.winboll.studio.powerbell.utils.ImageCropUtils;
|
import cc.winboll.studio.powerbell.utils.ImageCropUtils;
|
||||||
import cc.winboll.studio.powerbell.utils.UriUtils;
|
import cc.winboll.studio.powerbell.utils.UriUtils;
|
||||||
import cc.winboll.studio.powerbell.views.BackgroundView;
|
import cc.winboll.studio.powerbell.views.BackgroundView;
|
||||||
|
import com.a4455jkjh.colorpicker.ColorPickerDialog;
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
|
import cc.winboll.studio.libappbase.ToastUtils;
|
||||||
import cc.winboll.studio.powerbell.R;
|
import cc.winboll.studio.powerbell.R;
|
||||||
|
import com.a4455jkjh.colorpicker.ColorPickerDialog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author ZhanGSKen<zhangsken@qq.com>
|
* @Author ZhanGSKen<zhangsken@qq.com>
|
||||||
@@ -660,6 +662,9 @@ public class ColorPaletteDialog extends Dialog implements View.OnClickListener,
|
|||||||
if (!isAppSelfUpdatingColor) {
|
if (!isAppSelfUpdatingColor) {
|
||||||
if (id == R.id.iv_color_picker) {
|
if (id == R.id.iv_color_picker) {
|
||||||
showSystemColorPicker(); // 打开系统颜色选择器
|
showSystemColorPicker(); // 打开系统颜色选择器
|
||||||
|
} if (id == R.id.iv_color_scale) {
|
||||||
|
ToastUtils.show("iv_color_scale");
|
||||||
|
openColorPickerDialog(mCurrentColor); // 打开系统颜色选择器
|
||||||
} else if (id == R.id.tv_confirm) {
|
} else if (id == R.id.tv_confirm) {
|
||||||
mListener.onColorSelected(mCurrentColor); // 确认选择,回调颜色
|
mListener.onColorSelected(mCurrentColor); // 确认选择,回调颜色
|
||||||
LogUtils.d(TAG, "confirm color | 回调颜色:" + String.format("#%08X", mCurrentColor));
|
LogUtils.d(TAG, "confirm color | 回调颜色:" + String.format("#%08X", mCurrentColor));
|
||||||
@@ -674,5 +679,50 @@ public class ColorPaletteDialog extends Dialog implements View.OnClickListener,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void openColorPickerDialog(int nColor){
|
||||||
|
ToastUtils.show("openColorPickerDialog");
|
||||||
|
ColorPickerDialog dlg = new ColorPickerDialog(getContext(), nColor);
|
||||||
|
dlg.setOnColorChangedListener(new com.a4455jkjh.colorpicker.view.OnColorChangedListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beforeColorChanged() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onColorChanged(int color) {
|
||||||
|
if (!isAppSelfUpdatingColor) {
|
||||||
|
isAppSelfUpdatingColor = true;
|
||||||
|
try {
|
||||||
|
mOriginalAlpha = Color.alpha(color);
|
||||||
|
mOriginalAlphaPercent = alpha2Percent(mOriginalAlpha);
|
||||||
|
mOriginalR = Color.red(color);
|
||||||
|
mOriginalG = Color.green(color);
|
||||||
|
mOriginalB = Color.blue(color);
|
||||||
|
mCurrentAlpha = mOriginalAlpha;
|
||||||
|
mCurrentAlphaPercent = mOriginalAlphaPercent;
|
||||||
|
mCurrentR = mOriginalR;
|
||||||
|
mCurrentG = mOriginalG;
|
||||||
|
mCurrentB = mOriginalB;
|
||||||
|
mCurrentBrightnessPercent = DEFAULT_BRIGHTNESS;
|
||||||
|
mCurrentColor = color;
|
||||||
|
updateAllViews();
|
||||||
|
LogUtils.d(TAG, "select system color | 选择颜色:" + String.format("#%08X", color)
|
||||||
|
+ " | 透明度:" + mCurrentAlphaPercent + "%");
|
||||||
|
} finally {
|
||||||
|
isAppSelfUpdatingColor = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterColorChanged() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
dlg.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
powerbell/src/main/res/drawable/color_scale_logo.png
Normal file
BIN
powerbell/src/main/res/drawable/color_scale_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 299 KiB |
@@ -7,15 +7,29 @@
|
|||||||
android:padding="20dp"
|
android:padding="20dp"
|
||||||
android:background="#FFFFFFFF">
|
android:background="#FFFFFFFF">
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/iv_color_picker"
|
android:orientation="horizontal"
|
||||||
android:layout_width="100dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="100dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:gravity="center_horizontal">
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:background="#FF0000"
|
<ImageView
|
||||||
android:clickable="true"
|
android:id="@+id/iv_color_picker"
|
||||||
android:focusable="true"/>
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:background="#FF0000"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_color_scale"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:src="@drawable/color_scale_logo"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
Reference in New Issue
Block a user