feat: 添加剪裁背景相关组件及版本更新
- 新增BackgroundRadioButton自定义单选按钮组件 - 新增CustomApplicationBackground应用背景管理类 - 更新build.properties版本构建号(0->19) - 完善封面剪裁背景修改功能相关基础设施
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Fri May 01 21:09:33 HKT 2026
|
||||
#Sat May 02 10:32:03 CST 2026
|
||||
stageCount=16
|
||||
libraryProject=
|
||||
baseVersion=15.0
|
||||
publishVersion=15.0.15
|
||||
buildCount=0
|
||||
buildCount=19
|
||||
baseBetaVersion=15.0.16
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package cc.winboll.studio.gallery.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.RadioButton;
|
||||
|
||||
public class BackgroundRadioButton extends RadioButton {
|
||||
|
||||
CustomApplicationBackground mCustomApplicationBackground;
|
||||
|
||||
public BackgroundRadioButton(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public BackgroundRadioButton(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public BackgroundRadioButton(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public void setupCustomApplicationBackground(Context context, int resId) {
|
||||
mCustomApplicationBackground = new CustomApplicationBackground(context, resId);
|
||||
}
|
||||
|
||||
public void setCustomApplicationBackground(CustomApplicationBackground customApplicationBackground) {
|
||||
mCustomApplicationBackground = customApplicationBackground;
|
||||
}
|
||||
|
||||
public CustomApplicationBackground getCustomApplicationBackground() {
|
||||
return mCustomApplicationBackground;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cc.winboll.studio.gallery.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
public class CustomApplicationBackground {
|
||||
Drawable mDrawable;
|
||||
|
||||
public CustomApplicationBackground(Drawable drawable) {
|
||||
mDrawable = drawable;
|
||||
}
|
||||
|
||||
public CustomApplicationBackground(int color) {
|
||||
mDrawable = new ColorDrawable(color);
|
||||
}
|
||||
|
||||
public CustomApplicationBackground(Context context, int resId) {
|
||||
mDrawable = context.getDrawable(resId);
|
||||
}
|
||||
|
||||
public Drawable getDrawable() {
|
||||
return mDrawable;
|
||||
}
|
||||
|
||||
public void setDrawable(Drawable drawable) {
|
||||
mDrawable = drawable;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user