中建365-二期开发-优化相关页面

develop
wlh 1 year ago
parent 886d9fcf30
commit 380b9694cc

@ -65,14 +65,14 @@ public class ImageGetterUtils {
int width = bitmap.getWidth();
int height = bitmap.getHeight();
//设置想要的大小
int newWidth = width;
int newHeight = height;
int newWidth = textView.getMeasuredWidth(); //width;
int newHeight = textView.getMeasuredHeight(); //height;
//计算压缩的比率
float scaleWidth = ((float) newWidth) / width;
float scaleHeight = ((float) newHeight) / height;
//获取想要缩放的matrix
Matrix matrix = new Matrix();
matrix.postScale(scaleWidth, scaleHeight);
matrix.postScale(scaleWidth, scaleWidth);
//获取新的bitmap
bitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true);

@ -1,6 +1,7 @@
package com.xty.common.util
import java.math.BigDecimal
import java.text.DecimalFormat
object NumUtils {
@ -12,4 +13,10 @@ object NumUtils {
val b2 = BigDecimal(java.lang.Double.toString(valueTwo.toDouble()))
return b1.divide(b2, scale, BigDecimal.ROUND_HALF_UP).toDouble()
}
fun formatter(value:Double,formatter:String):String{
var mFormat = DecimalFormat(formatter)
return mFormat.format(value).toString()
}
}

@ -1,5 +1,7 @@
package com.xty.network.model
import com.umeng.commonsdk.debug.D
data class HealthArchiveBean(
var bmiInfo:BMIInfo,
var healData:ArrayList<FamilyHealthBean.FamilyTargetBean>,
@ -7,7 +9,7 @@ data class HealthArchiveBean(
var bmi:String,
var userSchedule:Int,//完善进度
var bodyFat:String, //体脂率
var bodyFat:Double, //体脂率
var surveys:SurveysBean
){

Loading…
Cancel
Save