From 7cd845bce2b88eca4a792675eb5243a13b666da4 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 31 三月 2025 11:49:14 +0800 Subject: [PATCH] 2025年03月31日11:49:10 --- app/src/main/java/com/hdl/photovoltaic/ui/account/ChangePassword.java | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/account/ChangePassword.java b/app/src/main/java/com/hdl/photovoltaic/ui/account/ChangePassword.java index 15cd080..481a171 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/account/ChangePassword.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/account/ChangePassword.java @@ -32,6 +32,7 @@ import com.hdl.photovoltaic.other.HdlAccountLogic; import com.hdl.photovoltaic.other.HdlCommonLogic; import com.hdl.photovoltaic.other.HdlThreadLogic; +import com.hdl.photovoltaic.utils.GPSManagerUtils; import com.hdl.photovoltaic.widget.ConfirmationCancelDialog; import com.hdl.photovoltaic.widget.ConfirmationTipDialog; import com.sahooz.library.countrypicker.Country; @@ -86,6 +87,18 @@ switchPhoneOrMailView(); try { Country.load(this); + Country country = null; + if (TextUtils.isEmpty(GPSManagerUtils.getInstance().getCountryCode(this))) { + //鍐嶆牴鎹郴缁熻瑷� + country = Country.getCountryInfo(); + } else { + //鍏堟牴鎹畾浣� + country = Country.getLocationCountryInfo(GPSManagerUtils.getInstance().getCountryCode(this)); + } + if (country != null) { + viewBinding.regionAccountTv.setText(country.translate); + viewBinding.regionAccountNumberTv.setText("+" + country.code); + } } catch (Exception e) { e.printStackTrace(); } -- Gitblit v1.8.0