车辆车长规则优化
This commit is contained in:
parent
9ad2a9b4c4
commit
d4e3a5b87a
@ -232,7 +232,7 @@ class AuthDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
|||||||
//车长
|
//车长
|
||||||
if (it.overallDimension.contains("mm")) {
|
if (it.overallDimension.contains("mm")) {
|
||||||
var overall = it.overallDimension.replace("mm", "")
|
var overall = it.overallDimension.replace("mm", "")
|
||||||
var splits = overall.split("×")
|
var splits = overall.split("×","x","X")
|
||||||
if (splits.size == 3) {
|
if (splits.size == 3) {
|
||||||
upDrivingInfoBean.carLong =
|
upDrivingInfoBean.carLong =
|
||||||
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
||||||
|
@ -179,7 +179,7 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
|||||||
//车长
|
//车长
|
||||||
if (it.overallDimension.contains("mm")) {
|
if (it.overallDimension.contains("mm")) {
|
||||||
var overall = it.overallDimension.replace("mm", "")
|
var overall = it.overallDimension.replace("mm", "")
|
||||||
var splits = overall.split("×")
|
var splits = overall.split("×","x","X")
|
||||||
if (splits.size == 3) {
|
if (splits.size == 3) {
|
||||||
upDrivingInfoBean.carLong =
|
upDrivingInfoBean.carLong =
|
||||||
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
||||||
|
@ -270,7 +270,7 @@ class EditDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
|||||||
//车长
|
//车长
|
||||||
if (it.overallDimension.contains("mm")) {
|
if (it.overallDimension.contains("mm")) {
|
||||||
var overall = it.overallDimension.replace("mm", "")
|
var overall = it.overallDimension.replace("mm", "")
|
||||||
var splits = overall.split("×")
|
var splits = overall.split("×","x","X")
|
||||||
if (splits.size == 3) {
|
if (splits.size == 3) {
|
||||||
upDrivingInfoBean.carLong =
|
upDrivingInfoBean.carLong =
|
||||||
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
||||||
|
@ -226,7 +226,7 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
|||||||
//车长
|
//车长
|
||||||
if (it.overallDimension.contains("mm")) {
|
if (it.overallDimension.contains("mm")) {
|
||||||
var overall = it.overallDimension.replace("mm", "")
|
var overall = it.overallDimension.replace("mm", "")
|
||||||
var splits = overall.split("×")
|
var splits = overall.split("×","x","X")
|
||||||
if (splits.size == 3) {
|
if (splits.size == 3) {
|
||||||
upDrivingInfoBean.trailerLong =
|
upDrivingInfoBean.trailerLong =
|
||||||
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
||||||
|
@ -297,7 +297,6 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
|||||||
btnFace.visibility = if (data?.isRealName == "0") View.VISIBLE else View.GONE
|
btnFace.visibility = if (data?.isRealName == "0") View.VISIBLE else View.GONE
|
||||||
|
|
||||||
circleBarView2.progress = doneInfoCount * 100 / allInfoCount
|
circleBarView2.progress = doneInfoCount * 100 / allInfoCount
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,6 +219,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxWidth="@dimen/dp_100"
|
android:maxWidth="@dimen/dp_100"
|
||||||
|
android:drawableLeft="@drawable/start"
|
||||||
android:text="车辆所有人"
|
android:text="车辆所有人"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_15"></TextView>
|
android:textSize="@dimen/sp_15"></TextView>
|
||||||
@ -248,6 +249,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxWidth="@dimen/dp_100"
|
android:maxWidth="@dimen/dp_100"
|
||||||
android:text="使用性质"
|
android:text="使用性质"
|
||||||
|
android:drawableLeft="@drawable/start"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_15"></TextView>
|
android:textSize="@dimen/sp_15"></TextView>
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/cdPerson"
|
android:id="@+id/cdPerson"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -180,6 +181,7 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:drawableLeft="@drawable/start"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxWidth="@dimen/dp_100"
|
android:maxWidth="@dimen/dp_100"
|
||||||
@ -209,6 +211,7 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:drawableLeft="@drawable/start"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxWidth="@dimen/dp_100"
|
android:maxWidth="@dimen/dp_100"
|
||||||
|
@ -66,7 +66,7 @@ public class CircleBarView2 extends View {
|
|||||||
|
|
||||||
public CircleBarView2(Context context, AttributeSet attrs, int defStyleAttr) {
|
public CircleBarView2(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
super(context, attrs, defStyleAttr);
|
super(context, attrs, defStyleAttr);
|
||||||
initAttrs(context,attrs);
|
initAttrs(context, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMax() {
|
public int getMax() {
|
||||||
@ -82,7 +82,7 @@ public class CircleBarView2 extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setProgress(int progress) {
|
public void setProgress(int progress) {
|
||||||
if (this.progress == progress) {
|
if (progress != 0 && this.progress == progress) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (animator != null && animator.isRunning()) {
|
if (animator != null && animator.isRunning()) {
|
||||||
@ -158,7 +158,7 @@ public class CircleBarView2 extends View {
|
|||||||
innerPaint.setColor(context.getColor(R.color.color_f15));
|
innerPaint.setColor(context.getColor(R.color.color_f15));
|
||||||
innerPaint.setStyle(Paint.Style.STROKE);
|
innerPaint.setStyle(Paint.Style.STROKE);
|
||||||
innerPaint.setStrokeCap(Paint.Cap.ROUND);
|
innerPaint.setStrokeCap(Paint.Cap.ROUND);
|
||||||
innerPaint.setStrokeWidth(roundWidth+10);
|
innerPaint.setStrokeWidth(roundWidth + 10);
|
||||||
|
|
||||||
mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
mTextPaint.setColor(context.getColor(R.color.color_9));
|
mTextPaint.setColor(context.getColor(R.color.color_9));
|
||||||
@ -206,7 +206,7 @@ public class CircleBarView2 extends View {
|
|||||||
// 中心点
|
// 中心点
|
||||||
centerPoint.set(getWidth() / 2, height / 2);
|
centerPoint.set(getWidth() / 2, height / 2);
|
||||||
// 计算圆弧显示的范围,height * 2 是因为圆弧的高度是根据园来算的,所以双倍才是半个圆
|
// 计算圆弧显示的范围,height * 2 是因为圆弧的高度是根据园来算的,所以双倍才是半个圆
|
||||||
oval.set(getWidth() / 2f - radius, (float) roundWidth, getWidth() / 2f + radius, height * 2 - roundWidth*2);
|
oval.set(getWidth() / 2f - radius, (float) roundWidth, getWidth() / 2f + radius, height * 2 - roundWidth * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user