Commit 75f0f808 by sikang

add VN

parent 89cdc6d8
...@@ -78,6 +78,7 @@ public class ReviewHookActivity extends BaseActivity { ...@@ -78,6 +78,7 @@ public class ReviewHookActivity extends BaseActivity {
mBackBtn = findViewById(R.id.activity_review_menu_btn); mBackBtn = findViewById(R.id.activity_review_menu_btn);
fragmentLayout = findViewById(R.id.activity_review_fragmentLayout); fragmentLayout = findViewById(R.id.activity_review_fragmentLayout);
UIHelper.setMargins(mMenuLayout, -1, QMUIStatusBarHelper.getStatusbarHeight(this), -1, -1);
QMUIStatusBarHelper.translucent(this); QMUIStatusBarHelper.translucent(this);
mTopBar.setStatusBarHeight(QMUIStatusBarHelper.getStatusbarHeight(this)); mTopBar.setStatusBarHeight(QMUIStatusBarHelper.getStatusbarHeight(this));
...@@ -87,6 +88,7 @@ public class ReviewHookActivity extends BaseActivity { ...@@ -87,6 +88,7 @@ public class ReviewHookActivity extends BaseActivity {
mTopBar.toolBar().setTitle(LibConfig.APP_NAME); mTopBar.toolBar().setTitle(LibConfig.APP_NAME);
initListener(); initListener();
//假数据 //假数据
......
...@@ -27,7 +27,7 @@ public class ReviewProductAdapter extends BaseRecyclerAdapter<ProductBean> { ...@@ -27,7 +27,7 @@ public class ReviewProductAdapter extends BaseRecyclerAdapter<ProductBean> {
@Override @Override
public void bindData(RecyclerViewHolder holder, int position, ProductBean item) { public void bindData(RecyclerViewHolder holder, int position, ProductBean item) {
holder.getTextView(R.id.item_review_product_productName_tv).setText(item.getName() + " - Bunga: 0.038% / Hari"); holder.getTextView(R.id.item_review_product_productName_tv).setText(item.getName() + getContext().getString(R.string.text_interest_day));
//额度 //额度
String amount; String amount;
if (item.getMaxAmount() - item.getMinAmount() < 1 ) { if (item.getMaxAmount() - item.getMinAmount() < 1 ) {
......
...@@ -84,9 +84,9 @@ public class LoginManager { ...@@ -84,9 +84,9 @@ public class LoginManager {
} }
String[] countryCodes; String[] countryCodes;
if (LibConfig.DEBUG) { if (LibConfig.DEBUG) {
countryCodes = new String[]{"CN", "ID"}; countryCodes = new String[]{"CN", "ID", "VN"};
} else { } else {
countryCodes = new String[]{"ID"}; countryCodes = new String[]{"ID", "VN"};
} }
final Intent intent = new Intent(activity, AccountKitActivity.class); final Intent intent = new Intent(activity, AccountKitActivity.class);
...@@ -113,7 +113,7 @@ public class LoginManager { ...@@ -113,7 +113,7 @@ public class LoginManager {
} else { } else {
result.onLoginSuccess(loginResult); result.onLoginSuccess(loginResult);
} }
}else{ } else {
result.onLoginError(new AccountKitError(AccountKitError.Type.INITIALIZATION_ERROR)); result.onLoginError(new AccountKitError(AccountKitError.Type.INITIALIZATION_ERROR));
} }
} }
......
...@@ -19,6 +19,9 @@ public class AppLanguageUtils { ...@@ -19,6 +19,9 @@ public class AppLanguageUtils {
public static void setLanguage(Context context, String language) { public static void setLanguage(Context context, String language) {
if("auto".equals(language)){
return;
}
Resources resources = context.getApplicationContext().getResources(); Resources resources = context.getApplicationContext().getResources();
DisplayMetrics dm = resources.getDisplayMetrics(); DisplayMetrics dm = resources.getDisplayMetrics();
Configuration config = resources.getConfiguration(); Configuration config = resources.getConfiguration();
...@@ -42,7 +45,7 @@ public class AppLanguageUtils { ...@@ -42,7 +45,7 @@ public class AppLanguageUtils {
locale = Locale.SIMPLIFIED_CHINESE; locale = Locale.SIMPLIFIED_CHINESE;
break; break;
case "in": case "in":
locale = Locale.ROOT; locale = new Locale("in");
break; break;
default: default:
locale = Locale.getDefault(); locale = Locale.getDefault();
...@@ -53,6 +56,9 @@ public class AppLanguageUtils { ...@@ -53,6 +56,9 @@ public class AppLanguageUtils {
public static Context attachBaseContext(Context context, String language) { public static Context attachBaseContext(Context context, String language) {
if("auto".equals(language)){
return context;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
return updateResources(context, getLocale(language)); return updateResources(context, getLocale(language));
} else { } else {
......
...@@ -94,27 +94,28 @@ public class DialogManager { ...@@ -94,27 +94,28 @@ public class DialogManager {
*/ */
public static void showRoteDetailDialog(Context context, LoaningAmoutBean loanBean) { public static void showRoteDetailDialog(Context context, LoaningAmoutBean loanBean) {
DialogFactory.createCustomDialog(context, R.layout.dialog_rate_detail, (dialog, viewHolder) -> { DialogFactory.createCustomDialog(context, R.layout.dialog_rate_detail, (dialog, viewHolder) -> {
viewHolder.setStringFormat(R.id.dialog_ratedetail_total_amount_tv, "Rp" + (loanBean.getTotalAmount() - loanBean.getServiceFee() - loanBean.getInterest())); String moneySymbol = context.getString(R.string.moneySymbol);
viewHolder.setStringFormat(R.id.dialog_ratedetail_issue_amount_tv, "Rp" + loanBean.getIssueAmount()); viewHolder.setStringFormat(R.id.dialog_ratedetail_total_amount_tv, moneySymbol + (loanBean.getTotalAmount() - loanBean.getServiceFee() - loanBean.getInterest()));
viewHolder.setStringFormat(R.id.dialog_ratedetail_due_amount_tv, "Rp" + loanBean.getDueAmount()); viewHolder.setStringFormat(R.id.dialog_ratedetail_issue_amount_tv, moneySymbol + loanBean.getIssueAmount());
viewHolder.setStringFormat(R.id.dialog_ratedetail_interest_tv, "Rp" + loanBean.getInterest()); viewHolder.setStringFormat(R.id.dialog_ratedetail_due_amount_tv, moneySymbol + loanBean.getDueAmount());
viewHolder.setStringFormat(R.id.dialog_ratedetail_interest_tv, moneySymbol + loanBean.getInterest());
double diff = loanBean.getServiceFee() - (loanBean.getAccountMangeFee() + loanBean.getReviewFee() + loanBean.getPaymentFee() + loanBean.getDataSearchFee()); double diff = loanBean.getServiceFee() - (loanBean.getAccountMangeFee() + loanBean.getReviewFee() + loanBean.getPaymentFee() + loanBean.getDataSearchFee());
if (Math.abs((int) diff) < 1) { if (Math.abs((int) diff) < 1) {
viewHolder.setStringFormat(R.id.dialog_ratedetail_accountManageFee_tv, "Rp" + loanBean.getAccountMangeFee()); viewHolder.setStringFormat(R.id.dialog_ratedetail_accountManageFee_tv, moneySymbol + loanBean.getAccountMangeFee());
viewHolder.getTextView(R.id.dialog_ratedetail_accountManageFee_tv).setVisibility(View.VISIBLE); viewHolder.getTextView(R.id.dialog_ratedetail_accountManageFee_tv).setVisibility(View.VISIBLE);
viewHolder.setStringFormat(R.id.dialog_ratedetail_reviewFee_tv, "Rp" + loanBean.getReviewFee()); viewHolder.setStringFormat(R.id.dialog_ratedetail_reviewFee_tv, moneySymbol + loanBean.getReviewFee());
viewHolder.getTextView(R.id.dialog_ratedetail_reviewFee_tv).setVisibility(View.VISIBLE); viewHolder.getTextView(R.id.dialog_ratedetail_reviewFee_tv).setVisibility(View.VISIBLE);
viewHolder.setStringFormat(R.id.dialog_ratedetail_paymentFee_tv, "Rp" + loanBean.getPaymentFee()); viewHolder.setStringFormat(R.id.dialog_ratedetail_paymentFee_tv, moneySymbol + loanBean.getPaymentFee());
viewHolder.getTextView(R.id.dialog_ratedetail_paymentFee_tv).setVisibility(View.VISIBLE); viewHolder.getTextView(R.id.dialog_ratedetail_paymentFee_tv).setVisibility(View.VISIBLE);
viewHolder.setStringFormat(R.id.dialog_ratedetail_dataSearchFee_tv, "Rp" + loanBean.getDataSearchFee()); viewHolder.setStringFormat(R.id.dialog_ratedetail_dataSearchFee_tv, moneySymbol + loanBean.getDataSearchFee());
viewHolder.getTextView(R.id.dialog_ratedetail_dataSearchFee_tv).setVisibility(View.VISIBLE); viewHolder.getTextView(R.id.dialog_ratedetail_dataSearchFee_tv).setVisibility(View.VISIBLE);
}else{ }else{
viewHolder.setStringFormat(R.id.dialog_ratedetail_servicefee_tv, "Rp" + loanBean.getServiceFee()); viewHolder.setStringFormat(R.id.dialog_ratedetail_servicefee_tv, moneySymbol + loanBean.getServiceFee());
viewHolder.getTextView(R.id.dialog_ratedetail_servicefee_tv).setVisibility(View.VISIBLE); viewHolder.getTextView(R.id.dialog_ratedetail_servicefee_tv).setVisibility(View.VISIBLE);
} }
viewHolder.getButton(R.id.dialog_ratedetail_sure_btn).setOnClickListener(new OnEventClickListener() { viewHolder.getButton(R.id.dialog_ratedetail_sure_btn).setOnClickListener(new OnEventClickListener() {
......
...@@ -79,10 +79,11 @@ ...@@ -79,10 +79,11 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<FrameLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="270dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="left"> android:layout_gravity="left"
android:orientation="vertical">
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -349,7 +350,7 @@ ...@@ -349,7 +350,7 @@
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</FrameLayout> </LinearLayout>
</com.common.widget.PenetrateDrawerLayout> </com.common.widget.PenetrateDrawerLayout>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
...@@ -872,7 +872,7 @@ ...@@ -872,7 +872,7 @@
<string name="enum_education_S3">无上学经历</string> <string name="enum_education_S3">无上学经历</string>
<string name="moneySymbol"></string> <string name="moneySymbol"></string>
<string name="repayment_amount">还款金额</string> <string name="repayment_amount">还款金额</string>
...@@ -1041,5 +1041,15 @@ ...@@ -1041,5 +1041,15 @@
<string name="emergency_contact_title">紧急联系人</string> <string name="emergency_contact_title">紧急联系人</string>
<string name="text_rate_detail" translatable="false">Giá trị chi tiết</string>
<string name="text_total_amount" translatable="false">Tổng số tiền:%s</string>
<string name="text_issue_amount" translatable="false">Jumlah diterima: %s</string>
<string name="text_due_amount" translatable="false">Số tiền nhận được:%s</string>
<string name="text_interest" translatable="false"> Sở thích:%s</string>
<string name="text_service_fee" translatable="false">Phí dịch vụ:%s</string>
<string name="text_accountMangeFee" translatable="false">Phí quản lý tài khoản:%s</string>
<string name="text_reviewFee" translatable="false">Phí phê duyệt:%s</string>
<string name="text_paymentFee" translatable="false">Trả phí:%s </string>
<string name="text_dataSearchFee" translatable="false">Phí truy vấn dữ liệu:%s</string>
</resources> </resources>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment