|
|
@@ -1,6 +1,7 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.setting;
|
|
|
|
|
|
import android.content.Context;
|
|
|
+import android.support.v4.graphics.drawable.DrawableCompat;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
import android.widget.ImageView;
|
|
|
@@ -8,6 +9,7 @@ import android.widget.TextView;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.SettingHolderBean;
|
|
|
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
import kr.co.zumo.app.lifeplus.util.StringUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
|
|
|
@@ -26,6 +28,7 @@ public class CodeManageViewHolder extends SettingViewHolder {
|
|
|
private TextView textViewMenuText;
|
|
|
private ViewGroup customLayout;
|
|
|
private ImageView imageViewAccordion;
|
|
|
+ private ImageView imageViewIcon;
|
|
|
private TextView textViewShare;
|
|
|
private TextView textViewRecommend;
|
|
|
private TextView textViewRegistering;
|
|
|
@@ -34,6 +37,7 @@ public class CodeManageViewHolder extends SettingViewHolder {
|
|
|
super(itemView, context);
|
|
|
customLayout = itemView.findViewById(R.id.layout_code_manage);
|
|
|
imageViewAccordion = itemView.findViewById(R.id.image_view_setting_menu_accordion);
|
|
|
+ imageViewIcon = itemView.findViewById(R.id.image_view_setting_menu_icon);
|
|
|
textViewMenuText = itemView.findViewById(R.id.text_view_setting_menu_text);
|
|
|
|
|
|
textViewShare = itemView.findViewById(R.id.text_view_share);
|
|
|
@@ -58,7 +62,25 @@ public class CodeManageViewHolder extends SettingViewHolder {
|
|
|
public void update(SettingHolderBean settingBean) {
|
|
|
String code = settingBean.getMyRecommendCode();
|
|
|
|
|
|
- textViewRecommend.setText(StringUtil.isEmpty(code) ? "" : StringUtil.fromHtml(StringUtil.underline(code)));
|
|
|
+ int color;
|
|
|
+ if (settingBean.isMember()) {
|
|
|
+ imageViewAccordion.setVisibility(View.VISIBLE);
|
|
|
+ color = ResourceUtil.getColor(R.color.C000000);
|
|
|
+ textViewRecommend.setText(StringUtil.isEmpty(code) ? "" : StringUtil.fromHtml(StringUtil.underline(code)));
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // 비회원 딤 처리
|
|
|
+ customLayout.setVisibility(View.GONE);
|
|
|
+ imageViewAccordion.setVisibility(View.GONE);
|
|
|
+
|
|
|
+ color = ResourceUtil.getColor(R.color.C999999);
|
|
|
+
|
|
|
+ textViewMenuText.setOnClickListener(null);
|
|
|
+ imageViewAccordion.setOnClickListener(null);
|
|
|
+ }
|
|
|
+
|
|
|
+ textViewMenuText.setTextColor(color);
|
|
|
+ DrawableCompat.setTint(imageViewIcon.getDrawable(), color);
|
|
|
}
|
|
|
|
|
|
@Override
|