Bläddra i källkod

部分UI显示Bug修复,2023.05.08 14:46

master
lujin 2 år sedan
förälder
incheckning
ba51f0f214

Binär
app/debug/jz_app_v1.0.8_debug.apk Visa fil


+ 2
- 2
app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/MyRetrofit.java Visa fil

@@ -48,8 +48,8 @@ import retrofit2.converter.scalars.ScalarsConverterFactory;
public class MyRetrofit implements ToastAction {
//是否设置缓存
private static final boolean Cache = false;
private static final String Url = "192.168.100.63"; //8087
// private static final String Url = "222.85.144.89"; //19002
// private static final String Url = "192.168.100.63"; //8087
private static final String Url = "222.85.144.89"; //19002

public static final String PORT = "192.168.100.63".equals(Url) ? "8087" : "19002";
public static final String Urls = "http://" + Url + ":" + PORT;

+ 2
- 2
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/BusinessDetectionActivity.java Visa fil

@@ -151,8 +151,8 @@ public class BusinessDetectionActivity extends AppActivity
helper.setText(R.id.text2, item.getVehiclePlate());
helper.setText(R.id.text3, EnumBean.backValue(item.getVehiclePlateColor(), EnumBean.VEHICLE_COLOR));
helper.setText(R.id.text4, "PERSONAL_USER".equals(item.getUserType()) ? "个人用户" : "单位用户");
helper.setText(R.id.text6, "0".equals(item.getType()) ? "客车办理" : "货车办理");
helper.setText(R.id.text7, "0".equals(item.getType()) ? "客车" : "货车");
helper.setText(R.id.text6, "1".equals(item.getType()) ? "客车办理" : "货车办理");
helper.setText(R.id.text7, "1".equals(item.getType()) ? "客车" : "货车");
helper.setText(R.id.text8, item.getAmount() == null ? "0.00元" : Integer.parseInt(item.getAmount()) * 0.01 + "元");

new OrderUtils(getActivity(), item, true, helper.getView(R.id.LLBtns),

+ 67
- 4
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/VehicleInformationActivity.java Visa fil

@@ -34,6 +34,8 @@ import com.huntersun.vkyes.etcopencard.src.ui.dialog.DateDialog;
import com.huntersun.vkyes.etcopencard.src.ui.dialog.MenuDialog;
import com.huntersun.vkyes.etcopencard.src.ui.dialog.MessageDialog;
import com.jeremyliao.liveeventbus.LiveEventBus;
import com.parkingwang.keyboard.OnInputChangedListener;
import com.parkingwang.keyboard.PopupKeyboard;

import java.io.File;
import java.util.Arrays;
@@ -54,6 +56,7 @@ public class VehicleInformationActivity extends AppActivity {
private String textValue; //车辆用户类型
private final StringBuilder mapKey = new StringBuilder(); //协议类型
private String inputVehiclePlate = ""; //识别行驶证
private PopupKeyboard mPopupKeyboard;

private String ocrCarType = "";

@@ -103,7 +106,8 @@ public class VehicleInformationActivity extends AppActivity {
@SingleClick
public void onClick(View v) {
if (isSky(imgUrl1, "驾驶证主页", binding.image1) || isSky(imgUrl2, "驾驶证副业", binding.image2) ||
isSky(binding.text1.getText() + "", "车牌号", binding.text1) ||
// isSky(binding.text1.getText() + "", "车牌号", binding.text1) ||
isSky(binding.inputView.getNumber() + "", "车牌号", binding.inputView) ||
isSky(binding.text2.getText() + "", "车辆类型", binding.text2) ||
isSky(binding.text3.getText() + "", "所有人", binding.text3) ||
isSky(binding.text4.getText() + "", "核定载人数", binding.text4) ||
@@ -126,10 +130,14 @@ public class VehicleInformationActivity extends AppActivity {
return;
}
}
if (!getIntent().getStringExtra("vehiclePlate").equals(binding.text1.getText().toString().trim())){
if (!getIntent().getStringExtra("vehiclePlate").equals(binding.inputView.getNumber().trim())){
toast("填写的车牌号与"+getIntent().getStringExtra("vehiclePlate")+"不一致");
return;
}
// if (!getIntent().getStringExtra("vehiclePlate").equals(binding.text1.getText().toString().trim())){
// toast("填写的车牌号与"+getIntent().getStringExtra("vehiclePlate")+"不一致");
// return;
// }
// if(!inputVehiclePlate.equals(binding.text1.getText().toString())){
// toast("输入的车牌与上传的行驶证车牌不一致,请重新输入或者上传!");
// return;
@@ -229,6 +237,44 @@ public class VehicleInformationActivity extends AppActivity {

}
});

// 创建弹出键盘
mPopupKeyboard = new PopupKeyboard(this, VehicleInformationActivity.this);
// 弹出键盘内部包含一个KeyboardView,在此绑定输入两者关联。
mPopupKeyboard.attach(binding.inputView, this);
binding.inputView.set8thVisibility(true);
//点击按钮监听
binding.inputView.addOnFieldViewSelectedListener(index -> {
if (index == 7) {
if (binding.quote.getVisibility() == View.VISIBLE) {
binding.quote.setVisibility(View.GONE);
} else {
binding.quote.setVisibility(View.VISIBLE);
post(() -> {
mPopupKeyboard.dismiss(VehicleInformationActivity.this);
//删除最后一位字符
if (!TextUtils.isEmpty(binding.inputView.getEndText())) {
binding.inputView.removeLastCharOfNumber();
}
});
}
}
});
//添加输入更改侦听器
mPopupKeyboard.getController().addOnInputChangedListener(new OnInputChangedListener() {
@Override
public void onChanged(String number, boolean isCompleted) {
if (isCompleted || number.length() >= 7) {
mPopupKeyboard.dismiss(VehicleInformationActivity.this);
}
}

@Override
public void onCompleted(String number, boolean isAutoCompleted) {
mPopupKeyboard.dismiss(VehicleInformationActivity.this);
binding.inputView.reset(); //brand
}
});
}

/**
@@ -362,7 +408,8 @@ public class VehicleInformationActivity extends AppActivity {
.load(imgUrl3)
.into(binding.image3);
}
binding.text1.setText(bizContent1.getVehiclePlate()); //车牌号
binding.inputView.updateNumber(bizContent1.getVehiclePlate());//车牌号
// binding.text1.setText(bizContent1.getVehiclePlate()); //车牌号
binding.text2.setText(bizContent1.getVehicleType()); //车辆类型
binding.text3.setText(bizContent1.getOwnerName()); //所有人
try {
@@ -484,7 +531,23 @@ public class VehicleInformationActivity extends AppActivity {
//行驶证主页
if (view == binding.image1) {
if (!TextUtils.isEmpty(bizContent1.getPlate_a())) {
binding.text1.setText(bizContent1.getPlate_a()); //车牌号
// binding.text1.setText(bizContent1.getPlate_a()); //车牌号
binding.inputView.updateNumber(bizContent1.getPlate_a()); //车牌号
if (bizContent1.getPlate_a().length()>=8){
if (binding.quote.getVisibility() == View.VISIBLE) {
binding.quote.setVisibility(View.GONE);
}
}else {
binding.quote.setVisibility(View.VISIBLE);
binding.inputView.set8thVisibility(true);
post(() -> {
mPopupKeyboard.dismiss(VehicleInformationActivity.this);
//删除最后一位字符
if (!TextUtils.isEmpty(binding.inputView.getEndText())) {
binding.inputView.removeLastCharOfNumber();
}
});
}
}
if (!TextUtils.isEmpty(bizContent1.getVehicle())) {
ocrCarType = bizContent1.getVehicle();

+ 2
- 2
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/fragment/FragmentSonOne.java Visa fil

@@ -205,8 +205,8 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity>
helper.setText(R.id.text2, item.getVehiclePlate());
helper.setText(R.id.text3, EnumBean.backValue(item.getVehiclePlateColor(), EnumBean.VEHICLE_COLOR));
helper.setText(R.id.text4, "PERSONAL_USER".equals(item.getUserType()) ? "个人用户" : "单位用户");
helper.setText(R.id.text6, "0".equals(item.getType()) ? "客车办理" : "货车办理");
helper.setText(R.id.text7, "0".equals(item.getType()) ? "客车" : "货车");
helper.setText(R.id.text6, "1".equals(item.getType()) ? "客车办理" : "货车办理");
helper.setText(R.id.text7, "1".equals(item.getType()) ? "客车" : "货车");
helper.setText(R.id.text8, item.getAmount() == null ? "0.00元" : FunHelper.changeF2Y(Long.valueOf(item.getAmount())) + "元");
helper.setGone(R.id.tvLine,helper.getLayoutPosition() == getData().size() - 1 ? true : false);


+ 49
- 12
app/src/main/res/layout/activity_vehicle_information.xml Visa fil

@@ -443,29 +443,66 @@

<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_45"
android:layout_height="@dimen/dp_60"
android:background="#FFFFFF"
android:gravity="center_vertical">

<TextView
android:layout_width="@dimen/dp_110"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:drawableLeft="@mipmap/must"
android:gravity="center_vertical"
android:text="车牌号"
android:textSize="@dimen/sp_14"
tools:ignore="UseCompatTextViewDrawableXml" />

<com.hjq.widget.view.ClearEditText
android:id="@+id/text1"
style="@style/EditTextStyle"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:drawablePadding="@dimen/dp_15"
android:hint="请输入车牌号"
android:paddingHorizontal="@dimen/dp_20"
android:singleLine="true" />
android:layout_marginRight="@dimen/dp_15"
android:layout_height="wrap_content">

<com.parkingwang.keyboard.view.InputView
android:id="@+id/input_view"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_45"
app:pwkInputTextSize="16sp" />

<LinearLayout
android:id="@+id/quote"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_47"
android:background="@drawable/pwk_input_item_border_gray4"
android:layout_alignParentRight="true"
android:gravity="center"
android:orientation="vertical">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+"
android:textColor="#10D09D" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_3"
android:text="新能源"
android:textColor="#10D09D"
android:textSize="@dimen/sp_8" />

</LinearLayout>

</RelativeLayout>

<!-- <com.hjq.widget.view.ClearEditText-->
<!-- android:id="@+id/text1"-->
<!-- style="@style/EditTextStyle"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:background="@color/white"-->
<!-- android:drawablePadding="@dimen/dp_15"-->
<!-- android:hint="请输入车牌号"-->
<!-- android:paddingHorizontal="@dimen/dp_20"-->
<!-- android:singleLine="true" />-->

</LinearLayout>


Laddar…
Avbryt
Spara