根据需求修改美颜UI

This commit is contained in:
zlzw 2022-10-25 11:24:42 +08:00
parent a0bff8a019
commit b4e048bf74
3 changed files with 7 additions and 5 deletions

View File

@ -37,7 +37,8 @@ public class BeautyShapeViewHolder extends BaseViewHolder {
super.onProgressChanged(seekBar, value, fromUser);
FaceBeautyBean bean = (FaceBeautyBean) itemView.getTag();
double toValue = SeekBarUtils.Companion.seekToValue(bean.getModelAttributeData().getMaxRange(), value, seekBar.getMin());
BeautyShapeViewHolder.this.value.setText(String.format("%.1f", toValue));
BeautyShapeViewHolder.this.value.setTag(String.format("%.1f", toValue));
BeautyShapeViewHolder.this.value.setText(value+"");
adapter.getFaceBeautyDataFactory().updateParamIntensity(bean.getKey(), toValue);
saveData();
}
@ -80,7 +81,7 @@ public class BeautyShapeViewHolder extends BaseViewHolder {
@Override
public void saveData() {
FaceBeautyBean bean = (FaceBeautyBean) itemView.getTag();
adapter.save(getName(this)+bean.getKey(), (String) value.getText());
adapter.save(getName(this)+bean.getKey(), (String) value.getTag());
}
@Override

View File

@ -36,7 +36,8 @@ public class BeautySkinViewHolder extends BaseViewHolder{
super.onProgressChanged(seekBar, value, fromUser);
FaceBeautyBean bean = (FaceBeautyBean) itemView.getTag();
double toValue = SeekBarUtils.Companion.seekToValue(bean.getModelAttributeData().getMaxRange(), value, seekBar.getMin());
BeautySkinViewHolder.this.value.setText(String.format("%.1f",toValue));
BeautySkinViewHolder.this.value.setTag(String.format("%.1f",toValue));
BeautySkinViewHolder.this.value.setText(value+"");
adapter.getFaceBeautyDataFactory().updateParamIntensity(bean.getKey(),toValue);
saveData();
}
@ -80,7 +81,7 @@ public class BeautySkinViewHolder extends BaseViewHolder{
@Override
public void saveData() {
String key = ((FaceBeautyBean)itemView.getTag()).getKey();
String val= (String) value.getText();
String val= (String) value.getTag();
adapter.save(getName(this)+key,val);
}

View File

@ -27,6 +27,6 @@ ext {
// true表示谷歌支付 false
isGooglePlay : false,
//
isUploadLog : false
isUploadLog : true
]
}