修改了用户热量信息界面
This commit is contained in:
@@ -17,6 +17,10 @@ public class CustomImageView extends androidx.appcompat.widget.AppCompatImageVie
|
||||
private String textToDraw;
|
||||
private Paint mPaint;
|
||||
private int mTextSize = dpToPixels(26);
|
||||
/**
|
||||
* 最大高度
|
||||
*/
|
||||
private static final int MAX_HEIGHT = 280;
|
||||
|
||||
private boolean isDrawText = false;
|
||||
|
||||
@@ -65,6 +69,10 @@ public class CustomImageView extends androidx.appcompat.widget.AppCompatImageVie
|
||||
}
|
||||
}
|
||||
|
||||
public void setCustomHeightPercent(float percent, boolean isAnimation) {
|
||||
setCustomHeight((int) (percent * MAX_HEIGHT), isAnimation);
|
||||
}
|
||||
|
||||
// 用于设置自定义高度的方法
|
||||
public void setCustomHeight(int height, boolean isAnimation) {
|
||||
ViewGroup.LayoutParams layoutParams = getLayoutParams();
|
||||
|
||||
Reference in New Issue
Block a user