修复软键盘与输入框联动以及提交添加loading

This commit is contained in:
lijia 2024-07-10 15:05:19 +08:00
parent 9202ba437c
commit 06cc3ba9db
3 changed files with 24 additions and 2 deletions

View File

@ -93,6 +93,7 @@
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.PhotoCarActivity" android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.PhotoCarActivity"
android:windowSoftInputMode="adjustPan|stateHidden"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.VehicleAuthActivity" android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.VehicleAuthActivity"
@ -160,6 +161,7 @@
</activity> </activity>
<activity <activity
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity" android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity"
android:windowSoftInputMode="adjustPan|stateHidden"
android:screenOrientation="portrait"/> android:screenOrientation="portrait"/>
<activity <activity
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AddCarSuccActivity" android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AddCarSuccActivity"

View File

@ -157,6 +157,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|| CacheGroup.cacheList.get("saveVehicleLicense") != null || CacheGroup.cacheList.get("authUrl") != null || CacheGroup.cacheList.get("saveVehicleLicense") != null || CacheGroup.cacheList.get("authUrl") != null
|| CacheGroup.cacheList.get("saveDrawCar") != null) { || CacheGroup.cacheList.get("saveDrawCar") != null) {
if (CacheGroup.cacheList.get("driverAuthIdCard") != null) { if (CacheGroup.cacheList.get("driverAuthIdCard") != null) {
if (customDialog != null) {
customDialog.dismiss();
}
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthIdCard"), BaseBean.class); BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthIdCard"), BaseBean.class);
if (bb.getCode() == 200) { if (bb.getCode() == 200) {
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show(); Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
@ -174,6 +177,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
} }
if (CacheGroup.cacheList.get("driverAuthLicense") != null) { if (CacheGroup.cacheList.get("driverAuthLicense") != null) {
if (customDialog != null) {
customDialog.dismiss();
}
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthLicense"), BaseBean.class); BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthLicense"), BaseBean.class);
if (bb.getCode() == 200) { if (bb.getCode() == 200) {
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show(); Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
@ -206,6 +212,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
} }
if (CacheGroup.cacheList.get("saveVehicleLicense") != null) { if (CacheGroup.cacheList.get("saveVehicleLicense") != null) {
if (customDialog != null) {
customDialog.dismiss();
}
CarZhengBean czb = gson.fromJson(CacheGroup.cacheList.get("saveVehicleLicense"), CarZhengBean.class); CarZhengBean czb = gson.fromJson(CacheGroup.cacheList.get("saveVehicleLicense"), CarZhengBean.class);
if (czb.getCode() == 200) { if (czb.getCode() == 200) {
String needUpQCPhoto = czb.getData().getNeedUpQCPhoto();//是否需要上传从业资格证 String needUpQCPhoto = czb.getData().getNeedUpQCPhoto();//是否需要上传从业资格证
@ -270,6 +279,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
CacheGroup.cacheList.remove("saveVehicleLicense"); CacheGroup.cacheList.remove("saveVehicleLicense");
} }
if (CacheGroup.cacheList.get("saveDrawCar") != null) { if (CacheGroup.cacheList.get("saveDrawCar") != null) {
if (customDialog != null) {
customDialog.dismiss();
}
Log.e("-saveDrawCar-", CacheGroup.cacheList.get("saveDrawCar")); Log.e("-saveDrawCar-", CacheGroup.cacheList.get("saveDrawCar"));
CarZhengBean bb = gson.fromJson(CacheGroup.cacheList.get("saveDrawCar"), CarZhengBean.class); CarZhengBean bb = gson.fromJson(CacheGroup.cacheList.get("saveDrawCar"), CarZhengBean.class);
if (bb.getCode() == 200) { if (bb.getCode() == 200) {
@ -941,6 +953,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
switch (index) { switch (index) {
case 0: case 0:
if (ocb != null && ocbb != null) { if (ocb != null && ocbb != null) {
customDialog = new CustomDialog(con, "网络请求中...");
customDialog.show();
IDInputBean ib = new IDInputBean(); IDInputBean ib = new IDInputBean();
ib.setIdcarName(str1); ib.setIdcarName(str1);
ib.setIdcard(str2); ib.setIdcard(str2);
@ -963,6 +977,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
//olb //olb
//{"档案编号","初次领证日期","准驾车型","有效期限(止)"}, //{"档案编号","初次领证日期","准驾车型","有效期限(止)"},
if (odl != null && odlb != null) { if (odl != null && odlb != null) {
customDialog = new CustomDialog(con, "网络请求中...");
customDialog.show();
Log.e("ocr", new Gson().toJson(odl)); Log.e("ocr", new Gson().toJson(odl));
LicenseInputBean iib = new LicenseInputBean(); LicenseInputBean iib = new LicenseInputBean();
iib.setArchivesName(str1); iib.setArchivesName(str1);
@ -984,6 +1000,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
// Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show(); // Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show();
// return; // return;
// } // }
customDialog = new CustomDialog(con, "网络请求中...");
customDialog.show();
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
if ("".equals(url3)) { if ("".equals(url3)) {
map.put("imgId", fid); map.put("imgId", fid);
@ -1009,6 +1027,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
// Toast.makeText(con,"请完善内容",Toast.LENGTH_SHORT).show(); // Toast.makeText(con,"请完善内容",Toast.LENGTH_SHORT).show();
// return; // return;
// } // }
customDialog = new CustomDialog(con, "网络请求中...");
customDialog.show();
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if ("".equals(url3)) { if ("".equals(url3)) {
map.put("imgId", fid); map.put("imgId", fid);

View File

@ -81,7 +81,7 @@
android:id="@+id/zjimg_name" android:id="@+id/zjimg_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_19" android:layout_marginTop="@dimen/dp_16"
android:text="从业资格证照片" android:text="从业资格证照片"
android:textColor="#ff333333" android:textColor="#ff333333"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
@ -91,7 +91,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dp_19" android:layout_marginBottom="@dimen/dp_16"
android:text="点击上传图片" android:text="点击上传图片"
android:textColor="@color/theme_color" android:textColor="@color/theme_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />