Commit 92e204d2 by sikang

添加同盾列表

parent 1929a750
package com.common.bean;
/**
* Created by SiKang on 2019/1/14.
*/
......@@ -31,4 +32,6 @@ public class ThirdPartItemBean {
public void setBindFlag(boolean bindFlag) {
this.bindFlag = bindFlag;
}
}
......@@ -19,7 +19,7 @@ public enum TDChannel {
TELKOMSEL("102001", R.drawable.ic_telkomsel),
XL("102002", R.drawable.ic_xl),
INDOSAT("102003", R.drawable.ic_indosat),
WHATSAPP("102003", R.drawable.ic_whatsapp),
WHATSAPP("103003", R.drawable.ic_whatsapp),
BPJS("105002", R.drawable.ic_facebook),
INSTAGRAM("103002", R.drawable.ic_facebook),
LINKEDIN("903004", R.drawable.ic_facebook);
......
......@@ -7,6 +7,7 @@ import android.view.View;
import com.common.bean.ThirdPartItemBean;
import com.common.constants.TDChannel;
import java.nio.channels.Channel;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -33,7 +34,7 @@ public class TDAccountAdapter extends BaseRecyclerAdapter<ThirdPartItemBean> {
iconMap.put("INDOSAT", TDChannel.INDOSAT);
iconMap.put("LAZADA", TDChannel.LAZADA);
iconMap.put("NPWP", TDChannel.NPWP);
iconMap.put("TELKOMSEL", TDChannel.TELKOMSEL);
iconMap.put("YYS", TDChannel.TELKOMSEL);
iconMap.put("TOKOPEDIA", TDChannel.TOKOPEDIA);
iconMap.put("WHATSAPP", TDChannel.WHATSAPP);
iconMap.put("XL", TDChannel.XL);
......@@ -52,17 +53,19 @@ public class TDAccountAdapter extends BaseRecyclerAdapter<ThirdPartItemBean> {
@Override
public void bindData(RecyclerViewHolder holder, int position, ThirdPartItemBean item) {
holder.getImageView(R.id.item_tdaccount_logo_imv).setImageResource(getChannel(item.getType()).getIcon());
if (getChannel(item.getType()) != null) {
holder.getImageView(R.id.item_tdaccount_logo_imv).setImageResource(getChannel(item.getType()).getIcon());
}
holder.getTextView(R.id.item_tdaccount_name_tv).setText(item.getType());
holder.getImageView(R.id.item_tdaccount_finish_imv).setImageResource(finishDrawable);
holder.getImageView(R.id.item_tdaccount_start_btn).setImageResource(normalDrawable);
holder.getView(R.id.item_tdaccount_start_btn).setBackgroundResource(normalDrawable);
if (item.isBindFlag()) {
holder.getImageView(R.id.item_tdaccount_finish_imv).setVisibility(View.VISIBLE);
holder.getImageView(R.id.item_tdaccount_start_btn).setVisibility(View.GONE);
holder.getView(R.id.item_tdaccount_start_btn).setVisibility(View.GONE);
} else {
holder.getImageView(R.id.item_tdaccount_finish_imv).setVisibility(View.VISIBLE);
holder.getImageView(R.id.item_tdaccount_start_btn).setVisibility(View.GONE);
holder.getImageView(R.id.item_tdaccount_finish_imv).setVisibility(View.GONE);
holder.getView(R.id.item_tdaccount_start_btn).setVisibility(View.VISIBLE);
}
}
......@@ -74,4 +77,17 @@ public class TDAccountAdapter extends BaseRecyclerAdapter<ThirdPartItemBean> {
return null;
}
}
/**
* 是否完成了必须的认证
* */
public static boolean isTDPassed(List<ThirdPartItemBean> itemBeans) {
for (ThirdPartItemBean item : itemBeans) {
if (!item.isBindFlag() && item.isForceFlag()) {
return false;
}
}
return true;
}
}
......@@ -3,55 +3,67 @@
android:id="@+id/fragment_account_gojek_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingBottom="10dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="10dp">
android:background="@color/white"
android:orientation="vertical">
<ImageView
android:id="@+id/item_tdaccount_logo_imv"
android:layout_width="40dp"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/item_tdaccount_name_tv"
android:layout_width="0dp"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_weight="1" />
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingBottom="10dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="10dp">
<!--<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton-->
<!--android:id="@+id/fragment_account_gojek_no"-->
<!--android:layout_width="73dp"-->
<!--android:layout_height="26dp"-->
<!--android:clickable="false"-->
<!--android:enabled="false"-->
<!--android:longClickable="false"-->
<!--android:text="@string/text_optional"-->
<!--android:textColor="@color/white"-->
<!--android:textSize="10dp"-->
<!--app:qmui_backgroundColor="@color/main_color"-->
<!--app:qmui_radius="13dp" />-->
<ImageView
android:id="@+id/item_tdaccount_logo_imv"
android:layout_width="40dp"
android:layout_height="wrap_content" />
<Button
android:id="@+id/item_tdaccount_start_btn"
android:layout_width="100dp"
android:layout_height="30dp"
android:clickable="false"
android:enabled="false"
android:longClickable="false"
android:text="@string/text_optional"
android:textColor="@color/white"
android:textSize="10dp" />
<TextView
android:id="@+id/item_tdaccount_name_tv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_weight="1"
android:text="FACEBOOK"
android:textColor="@color/qmui_config_color_black" />
<!--<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton-->
<!--android:id="@+id/fragment_account_gojek_no"-->
<!--android:layout_width="73dp"-->
<!--android:layout_height="26dp"-->
<!--android:clickable="false"-->
<!--android:enabled="false"-->
<!--android:longClickable="false"-->
<!--android:text="@string/text_optional"-->
<!--android:textColor="@color/white"-->
<!--android:textSize="10dp"-->
<!--app:qmui_backgroundColor="@color/main_color"-->
<!--app:qmui_radius="13dp" />-->
<ImageView
android:id="@+id/item_tdaccount_finish_imv"
android:layout_width="23dp"
android:layout_height="wrap_content"
android:visibility="gone" />
<TextView
android:id="@+id/item_tdaccount_start_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:clickable="false"
android:enabled="false"
android:longClickable="false"
android:text="@string/text_optional"
android:textColor="@color/white"
android:textSize="11sp" />
<ImageView
android:id="@+id/item_tdaccount_finish_imv"
android:layout_width="23dp"
android:layout_height="wrap_content"
android:visibility="gone" />
</LinearLayout>
<TextView
style="@style/gray_line"
......
......@@ -64,6 +64,7 @@
<string name="input_invalid">Please enter the complete information</string>
<string name="text_certify_account">Verification below is optional, through verification can increase the possibility of an application in the ACC</string>
<string name="certify_not_pass">You must complete the following certifications</string>
<string name="text_loan_amount">Loan Amount</string>
<string name="text_repayment_time">Due date</string>
......
......@@ -38,6 +38,8 @@
<string name="text_login_failed">登录失败</string>
<string name="certify_not_pass">您必须完成以下认证项</string>
<string name="text_loan_amount_statement">请选择贷款金额</string>
<string name="text_loan_replayment_statement">请选择贷款期限</string>
<string name="RP600k">¥ 600</string>
......
......@@ -57,6 +57,8 @@
<string name="text_no_photo">Mohon unggah foto dan mencobanya lagi</string>
<string name="certify_not_pass">Anda harus menyelesaikan sertifikasi berikut\n</string>
<string name="text_loan_amount_statement">Silahkan Pilih Jumlah Pinjaman</string>
<string name="text_loan_replayment_statement">Silakan Pilih Tenor Pinjaman</string>
<string name="RP600k">Rp600.000</string>
......
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