This commit is contained in:
nail
2026-04-12 21:36:32 +08:00
parent 73f07201d9
commit 0d66fdaf43
31 changed files with 1855 additions and 412 deletions

View File

@@ -12,7 +12,9 @@ import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.facebook.drawee.view.SimpleDraweeView;
import com.xuebiping.bolizhuzi.R; import com.xuebiping.bolizhuzi.R;
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
import com.xuebiping.bolizhuzi.controller.main.adapter.ViewHolder; import com.xuebiping.bolizhuzi.controller.main.adapter.ViewHolder;
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager; import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
import com.xuebiping.bolizhuzi.model.settings.MemberPrivilegesInfo; import com.xuebiping.bolizhuzi.model.settings.MemberPrivilegesInfo;
@@ -44,7 +46,6 @@ public class GeneralOptionsRecyclerAdapter extends RecyclerView.Adapter {
public void setOptions(List<MemberPrivilegesInfo> list) { public void setOptions(List<MemberPrivilegesInfo> list) {
mOptions = list; mOptions = list;
notifyDataSetChanged(); notifyDataSetChanged();
Log.i("TAG", "setOptions: mOptions---->" + mOptions.size());
} }
public List<MemberPrivilegesInfo> getmOptions() { public List<MemberPrivilegesInfo> getmOptions() {
@@ -65,120 +66,125 @@ public class GeneralOptionsRecyclerAdapter extends RecyclerView.Adapter {
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
MemberPrivilegesInfo options = mOptions.get(position); MemberPrivilegesInfo options = mOptions.get(position);
Holder dataHolder = (Holder) holder; Holder dataHolder = (Holder) holder;
if (vipType == 0) {
// dataHolder.cl_privilege.setBackgroundResource(R.drawable.member_privilege_bg); dataHolder.iv_privilege_img.setImageURI(ConstUrl.IMAGE_URL + options.getIcon());
dataHolder.iv_privilege_tip.setImageResource(R.drawable.ic_privilege_tip); dataHolder.tv_member_privilege_name.setText(options.getName());
// dataHolder.tv_member_privilege_name.setTextColor(Color.parseColor("#61380C"));
// dataHolder.tv_privilege_dec.setTextColor(Color.parseColor("#A6793E"));
} else {
// dataHolder.cl_privilege.setBackgroundResource(R.drawable.super_member_privilege_bg);
dataHolder.iv_privilege_tip.setImageResource(R.drawable.ic_privilege_tip1);
// dataHolder.tv_member_privilege_name.setTextColor(Color.parseColor("#DDD6FF"));
// dataHolder.tv_privilege_dec.setTextColor(Color.parseColor("#AAA0F0"));
}
switch (options.getId()) {
case 0:
if (vipType == 0) {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege1);
dataHolder.tv_member_privilege_name.setText("私信畅聊特权");
dataHolder.tv_privilege_dec.setText(options.getDesc()); dataHolder.tv_privilege_dec.setText(options.getDesc());
dataHolder.iv_privilege_tip.setVisibility(View.GONE);
} else { // if (vipType == 0) {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege1); //// dataHolder.cl_privilege.setBackgroundResource(R.drawable.member_privilege_bg);
dataHolder.tv_member_privilege_name.setText("加送金币"); // dataHolder.iv_privilege_tip.setImageResource(R.drawable.ic_privilege_tip);
dataHolder.tv_privilege_dec.setText("额外赠送金币"); //// dataHolder.tv_member_privilege_name.setTextColor(Color.parseColor("#61380C"));
if (TextUtils.equals("VISIBLE", options.getName())) { //// dataHolder.tv_privilege_dec.setTextColor(Color.parseColor("#A6793E"));
dataHolder.iv_privilege_tip.setVisibility(View.VISIBLE); // } else {
dataHolder.iv_privilege_tip.setOnClickListener(new View.OnClickListener() { //// dataHolder.cl_privilege.setBackgroundResource(R.drawable.super_member_privilege_bg);
@Override // dataHolder.iv_privilege_tip.setImageResource(R.drawable.ic_privilege_tip1);
public void onClick(View v) { //// dataHolder.tv_member_privilege_name.setTextColor(Color.parseColor("#DDD6FF"));
getGoodsList(); //// dataHolder.tv_privilege_dec.setTextColor(Color.parseColor("#AAA0F0"));
} // }
}); // switch (options.getId()) {
} else { // case 0:
dataHolder.iv_privilege_tip.setVisibility(View.GONE); // if (vipType == 0) {
} // dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege1);
} // dataHolder.tv_member_privilege_name.setText("私信畅聊特权");
break; // dataHolder.tv_privilege_dec.setText(options.getDesc());
case 1: // dataHolder.iv_privilege_tip.setVisibility(View.GONE);
if (vipType == 0) { // } else {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege4); // dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege1);
} else { // dataHolder.tv_member_privilege_name.setText("加送金币");
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege2); // dataHolder.tv_privilege_dec.setText("额外赠送金币");
}
dataHolder.tv_member_privilege_name.setText("视频畅聊卡");
dataHolder.tv_privilege_dec.setText(options.getDesc());
dataHolder.iv_privilege_tip.setVisibility(View.GONE);
dataHolder.iv_privilege_tip.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MemberTipsDialog tipsDialog = new MemberTipsDialog(mContext, "隐身功能,开启后您的上线、榜单、充值、登录、访问都会隐身,并且群发和速配免打扰。");
tipsDialog.show();
}
});
break;
case 2:
if (vipType == 0) {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege3);
} else {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege3);
}
dataHolder.tv_member_privilege_name.setText("充值加送金币");
dataHolder.tv_privilege_dec.setText("额外赠送金币");
// if (TextUtils.equals("VISIBLE", options.getName())) { // if (TextUtils.equals("VISIBLE", options.getName())) {
// dataHolder.iv_privilege_tip.setVisibility(View.VISIBLE); // dataHolder.iv_privilege_tip.setVisibility(View.VISIBLE);
// dataHolder.iv_privilege_tip.setOnClickListener(new View.OnClickListener() { // dataHolder.iv_privilege_tip.setOnClickListener(new View.OnClickListener() {
// @Override // @Override
// public void onClick(View v) { // public void onClick(View v) {
// MemberTipsDialog tipsDialog = new MemberTipsDialog(mContext, "专属客服微信号: Zdhfa1234"); // getGoodsList();
// tipsDialog.show();
// } // }
// }); // });
// } else { // } else {
dataHolder.iv_privilege_tip.setVisibility(View.GONE); // dataHolder.iv_privilege_tip.setVisibility(View.GONE);
// }
// }
// break;
// case 1:
// if (vipType == 0) {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege4);
// } else {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege2);
// }
// dataHolder.tv_member_privilege_name.setText("视频畅聊卡");
// dataHolder.tv_privilege_dec.setText(options.getDesc());
// dataHolder.iv_privilege_tip.setVisibility(View.GONE);
// dataHolder.iv_privilege_tip.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// MemberTipsDialog tipsDialog = new MemberTipsDialog(mContext, "隐身功能,开启后您的上线、榜单、充值、登录、访问都会隐身,并且群发和速配免打扰。");
// tipsDialog.show();
// }
// });
// break;
// case 2:
// if (vipType == 0) {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege3);
// } else {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege3);
// }
// dataHolder.tv_member_privilege_name.setText("充值加送金币");
// dataHolder.tv_privilege_dec.setText("额外赠送金币");
//// if (TextUtils.equals("VISIBLE", options.getName())) {
//// dataHolder.iv_privilege_tip.setVisibility(View.VISIBLE);
//// dataHolder.iv_privilege_tip.setOnClickListener(new View.OnClickListener() {
//// @Override
//// public void onClick(View v) {
//// MemberTipsDialog tipsDialog = new MemberTipsDialog(mContext, "专属客服微信号: Zdhfa1234");
//// tipsDialog.show();
//// }
//// });
//// } else {
// dataHolder.iv_privilege_tip.setVisibility(View.GONE);
//// }
// break;
// case 3:
// if (vipType == 0) {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege7);
// } else {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege7);
// }
// dataHolder.tv_member_privilege_name.setText("消息读取状态");
// dataHolder.tv_privilege_dec.setText("可查看是否已读");
// dataHolder.iv_privilege_tip.setVisibility(View.GONE);
// break;
// case 4:
// if (vipType == 0) {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege5);
// } else {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege4);
// }
// dataHolder.tv_member_privilege_name.setText("专属会员标识");
// dataHolder.tv_privilege_dec.setText("头像框、聊天气泡");
// dataHolder.iv_privilege_tip.setVisibility(View.GONE);
// break;
// case 5:
// if (vipType == 0) {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege2);
// } else {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege5);
// }
// dataHolder.tv_member_privilege_name.setText("隐身模式");
// dataHolder.tv_privilege_dec.setText("全平台隐身畅玩");
// dataHolder.iv_privilege_tip.setVisibility(View.GONE);
// break;
// case 6:
// if (vipType == 0) {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege6);
// } else {
// dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege6);
// }
// dataHolder.tv_member_privilege_name.setText("聊天气泡框");
// dataHolder.tv_privilege_dec.setText("VIP专属聊天框");
// dataHolder.iv_privilege_tip.setVisibility(View.GONE);
// break;
// } // }
break;
case 3:
if (vipType == 0) {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege7);
} else {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege7);
}
dataHolder.tv_member_privilege_name.setText("消息读取状态");
dataHolder.tv_privilege_dec.setText("可查看是否已读");
dataHolder.iv_privilege_tip.setVisibility(View.GONE);
break;
case 4:
if (vipType == 0) {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege5);
} else {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege4);
}
dataHolder.tv_member_privilege_name.setText("专属会员标识");
dataHolder.tv_privilege_dec.setText("头像框、聊天气泡");
dataHolder.iv_privilege_tip.setVisibility(View.GONE);
break;
case 5:
if (vipType == 0) {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege2);
} else {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege5);
}
dataHolder.tv_member_privilege_name.setText("隐身模式");
dataHolder.tv_privilege_dec.setText("全平台隐身畅玩");
dataHolder.iv_privilege_tip.setVisibility(View.GONE);
break;
case 6:
if (vipType == 0) {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_privilege6);
} else {
dataHolder.iv_privilege_img.setImageResource(R.drawable.ic_super_privilege6);
}
dataHolder.tv_member_privilege_name.setText("聊天气泡框");
dataHolder.tv_privilege_dec.setText("VIP专属聊天框");
dataHolder.iv_privilege_tip.setVisibility(View.GONE);
break;
}
} }
@Override @Override
@@ -188,7 +194,7 @@ public class GeneralOptionsRecyclerAdapter extends RecyclerView.Adapter {
public class Holder extends ViewHolder { public class Holder extends ViewHolder {
ImageView iv_privilege_img; SimpleDraweeView iv_privilege_img;
TextView tv_member_privilege_name; TextView tv_member_privilege_name;
TextView tv_privilege_dec; TextView tv_privilege_dec;
ImageView iv_privilege_tip; ImageView iv_privilege_tip;
@@ -204,25 +210,25 @@ public class GeneralOptionsRecyclerAdapter extends RecyclerView.Adapter {
} }
} }
private void getGoodsList() { // private void getGoodsList() {
SettingManager.getRechargeInfo((BaseActivity) mContext, 6, new HttpUiCallBack<RechargeListBean>() { // SettingManager.getRechargeInfo((BaseActivity) mContext, 6, new HttpUiCallBack<RechargeListBean>() {
@Override // @Override
public void onSuccess(BaseActivity activity, RechargeListBean result, String message) { // public void onSuccess(BaseActivity activity, RechargeListBean result, String message) {
if (result != null && result.getList() != null && result.getList().size() > 0) { // if (result != null && result.getList() != null && result.getList().size() > 0) {
MemberRechargeDialog memberRechargeDialog = new MemberRechargeDialog(activity, result.getList()); // MemberRechargeDialog memberRechargeDialog = new MemberRechargeDialog(activity, result.getList());
memberRechargeDialog.show(); // memberRechargeDialog.show();
} // }
} // }
//
@Override // @Override
public void onFailure(BaseActivity activity, String tip) { // public void onFailure(BaseActivity activity, String tip) {
//
} // }
//
@Override // @Override
public void onException(BaseActivity activity, Throwable e) { // public void onException(BaseActivity activity, Throwable e) {
//
} // }
}); // });
} // }
} }

View File

@@ -13,6 +13,7 @@ public class MemberBean {
private FreeBean free; private FreeBean free;
private List<String> privilege; private List<String> privilege;
private List<MemberPrivilegesInfo> privileges; private List<MemberPrivilegesInfo> privileges;
private String notice;
public List<String> getPrivilege() { public List<String> getPrivilege() {
return privilege; return privilege;
@@ -62,6 +63,14 @@ public class MemberBean {
this.free = free; this.free = free;
} }
public String getNotice() {
return notice;
}
public void setNotice(String notice) {
this.notice = notice;
}
@Override @Override
public String toString() { public String toString() {
return "MemberBean{" + return "MemberBean{" +

View File

@@ -23,8 +23,10 @@ import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.alipay.sdk.app.PayTask; import com.alipay.sdk.app.PayTask;
import com.facebook.drawee.view.SimpleDraweeView;
import com.xuebiping.bolizhuzi.R; import com.xuebiping.bolizhuzi.R;
import com.xuebiping.bolizhuzi.controller.constant.ConsUser; import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
import com.xuebiping.bolizhuzi.controller.constant.Constant; import com.xuebiping.bolizhuzi.controller.constant.Constant;
import com.xuebiping.bolizhuzi.controller.eventBus.PayEvent; import com.xuebiping.bolizhuzi.controller.eventBus.PayEvent;
import com.xuebiping.bolizhuzi.controller.settings.adapter.GeneralOptionsRecyclerAdapter; import com.xuebiping.bolizhuzi.controller.settings.adapter.GeneralOptionsRecyclerAdapter;
@@ -66,17 +68,17 @@ public class GeneralMemberFragment extends Fragment implements View.OnClickListe
private TextView tv_member_time; private TextView tv_member_time;
private ConstraintLayout lin_vip_shift1, lin_vip_shift2, lin_vip_shift3; private ConstraintLayout lin_vip_shift1, lin_vip_shift2, lin_vip_shift3;
private TextView tv_vip_shift_name1, tv_vip_shift_name2, tv_vip_shift_name3; private TextView tv_vip_shift_name1, tv_vip_shift_name2, tv_vip_shift_name3;
private TextView tv_vip_unit1, tv_vip_unit2;
private TextView tv_vip_price1, tv_vip_price2, tv_vip_price3; private TextView tv_vip_price1, tv_vip_price2, tv_vip_price3;
private TextView tv_vip_price_hint1, tv_vip_price_hint2, tv_vip_price_hint3; private TextView tv_vip_price_hint1, tv_vip_price_hint2, tv_vip_price_hint3;
private ImageView iv_vip_shift1, iv_vip_shift2;
private RecyclerView mOptionView; private RecyclerView mOptionView;
private TextView tv_member_setting; private TextView tv_member_setting;
private LinearLayout lin_member_bottom_btn; private LinearLayout lin_member_bottom_btn;
private TextView tv_member_open; private TextView tv_member_open;
private TextView tv_member_sure; private TextView tv_member_sure;
private GeneralOptionsRecyclerAdapter mAdapter; private GeneralOptionsRecyclerAdapter mAdapter;
private int type = 6; private int type = 0;
private List<MemberPrivilegesInfo> mPrivileges = new ArrayList<>(); private List<MemberPrivilegesInfo> mPrivileges = new ArrayList<>();
private Boolean isVip = false; private Boolean isVip = false;
@@ -96,6 +98,8 @@ public class GeneralMemberFragment extends Fragment implements View.OnClickListe
private String price3; private String price3;
private int defaultType = 0;//默认选中会员类型 private int defaultType = 0;//默认选中会员类型
private OnScrollChange onScrollChange; private OnScrollChange onScrollChange;
private SimpleDraweeView mUser_head;
private TextView mTv_notice;
@Nullable @Nullable
@Override @Override
@@ -110,28 +114,32 @@ public class GeneralMemberFragment extends Fragment implements View.OnClickListe
private void initView(View v) { private void initView(View v) {
sv_general_member = v.findViewById(R.id.sv_general_member); sv_general_member = v.findViewById(R.id.sv_general_member);
tv_member_time = v.findViewById(R.id.tv_member_time);
lin_vip_shift1 = v.findViewById(R.id.lin_vip_shift1);
tv_vip_shift_name1 = v.findViewById(R.id.tv_vip_shift_name1);
tv_vip_unit1 = v.findViewById(R.id.tv_vip_unit1);
tv_vip_price1 = v.findViewById(R.id.tv_vip_price1);
tv_vip_price_hint1 = v.findViewById(R.id.tv_vip_price_hint1);
lin_vip_shift2 = v.findViewById(R.id.lin_vip_shift2);
tv_vip_shift_name2 = v.findViewById(R.id.tv_vip_shift_name2);
tv_vip_unit2 = v.findViewById(R.id.tv_vip_unit2);
tv_vip_price2 = v.findViewById(R.id.tv_vip_price2);
tv_vip_price_hint2 = v.findViewById(R.id.tv_vip_price_hint2);
lin_vip_shift3 = v.findViewById(R.id.lin_vip_shift3);
tv_vip_shift_name3 = v.findViewById(R.id.tv_vip_shift_name3);
tv_vip_price3 = v.findViewById(R.id.tv_vip_price3);
tv_vip_price_hint3 = v.findViewById(R.id.tv_vip_price_hint3);
iv_vip_shift1 = v.findViewById(R.id.iv_vip_shift1);
iv_vip_shift2 = v.findViewById(R.id.iv_vip_shift2);
tv_member_setting = v.findViewById(R.id.tv_member_setting); tv_member_setting = v.findViewById(R.id.tv_member_setting);
lin_member_bottom_btn = v.findViewById(R.id.lin_member_bottom_btn); lin_member_bottom_btn = v.findViewById(R.id.lin_member_bottom_btn);
tv_member_open = v.findViewById(R.id.tv_member_open); tv_member_open = v.findViewById(R.id.tv_member_open);
tv_member_sure = v.findViewById(R.id.tv_member_sure); tv_member_sure = v.findViewById(R.id.tv_member_sure);
mUser_head = v.findViewById(R.id.user_head);
tv_member_time = v.findViewById(R.id.tv_member_time);
lin_vip_shift1 = v.findViewById(R.id.lin_vip_shift1);
tv_vip_shift_name1 = v.findViewById(R.id.tv_vip_shift_name1);
tv_vip_price1 = v.findViewById(R.id.tv_vip_price1);
tv_vip_price_hint1 = v.findViewById(R.id.tv_vip_price_hint1);
lin_vip_shift2 = v.findViewById(R.id.lin_vip_shift2);
tv_vip_shift_name2 = v.findViewById(R.id.tv_vip_shift_name2);
tv_vip_price2 = v.findViewById(R.id.tv_vip_price2);
tv_vip_price_hint2 = v.findViewById(R.id.tv_vip_price_hint2);
lin_vip_shift3 = v.findViewById(R.id.lin_vip_shift3);
tv_vip_shift_name3 = v.findViewById(R.id.tv_vip_shift_name3);
tv_vip_price3 = v.findViewById(R.id.tv_vip_price3);
tv_vip_price_hint3 = v.findViewById(R.id.tv_vip_price_hint3);
mOptionView = v.findViewById(R.id.general_recycler_view); mOptionView = v.findViewById(R.id.general_recycler_view);
mTv_notice = v.findViewById(R.id.tv_notice);
mOptionView.setLayoutManager(new GridLayoutManager(requireContext(), 3)); mOptionView.setLayoutManager(new GridLayoutManager(requireContext(), 3));
@@ -166,20 +174,26 @@ public class GeneralMemberFragment extends Fragment implements View.OnClickListe
SettingManager.getMemberInfo((BaseActivity) getActivity(), type, new HttpUiCallBack<MemberBean>() { SettingManager.getMemberInfo((BaseActivity) getActivity(), type, new HttpUiCallBack<MemberBean>() {
@Override @Override
public void onSuccess(BaseActivity activity, MemberBean result, String message) { public void onSuccess(BaseActivity activity, MemberBean result, String message) {
mTv_notice.setText(result.getNotice());
if (result.getInfo() != null) { if (result.getInfo() != null) {
mUser_head.setImageURI(ConstUrl.IMAGE_URL + result.getInfo().getAvatar());
if (!TextUtils.isEmpty(result.getInfo().getExpire_date_new())) { if (!TextUtils.isEmpty(result.getInfo().getExpire_date_new())) {
tv_member_time.setText("有效期至:" + result.getInfo().getExpire_date_new()); tv_member_time.setText("有效期至:" + result.getInfo().getExpire_date_new());
isVip = true; isVip = true;
lin_member_bottom_btn.setVisibility(View.VISIBLE); lin_member_bottom_btn.setVisibility(View.VISIBLE);
tv_member_open.setVisibility(View.GONE); tv_member_open.setVisibility(View.GONE);
} else { } else {
tv_member_time.setText("1000+用户已开通"); tv_member_time.setText("你还未开通VIP");
isVip = false; isVip = false;
lin_member_bottom_btn.setVisibility(View.GONE); lin_member_bottom_btn.setVisibility(View.GONE);
tv_member_open.setVisibility(View.VISIBLE); tv_member_open.setVisibility(View.VISIBLE);
tv_member_open.setText("立即开通"); tv_member_open.setText("立即开通");
} }
SPUtils.saveBoolean(getActivity(), ConsUser.USER_VIP, isVip); // SPUtils.saveBoolean(getActivity(), ConsUser.USER_VIP, isVip);
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) { if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
lin_member_bottom_btn.setVisibility(View.GONE); lin_member_bottom_btn.setVisibility(View.GONE);
@@ -211,20 +225,18 @@ public class GeneralMemberFragment extends Fragment implements View.OnClickListe
mAdapter.setVip_day_free_send(result.getInfo().getVip_day_free_send()); mAdapter.setVip_day_free_send(result.getInfo().getVip_day_free_send());
} }
mPrivileges.clear(); mPrivileges.clear();
for (int i = 0; i < 6; i++) { // for (int i = 0; i < 6; i++) {
MemberPrivilegesInfo info = new MemberPrivilegesInfo(); // MemberPrivilegesInfo info = new MemberPrivilegesInfo();
info.setId(i); // info.setId(i);
if (i == 0) { // if (i == 0) {
info.setDesc("半价无限畅聊"); // info.setDesc("半价无限畅聊");
}
if (i == 1) {
info.setDesc("每日可享1次免费视频单次最长1分钟");
}
// if (i == 2 && isVip) {
// info.setName("VISIBLE");
// } // }
mPrivileges.add(info); // if (i == 1) {
} // info.setDesc("每日可享1次免费视频单次最长1分钟");
// }
// mPrivileges.add(info);
// }
mPrivileges.addAll(result.getPrivileges());
mAdapter.setOptions(mPrivileges); mAdapter.setOptions(mPrivileges);
} }

View File

@@ -39,7 +39,7 @@ public class MemberActivity extends BaseActivity implements View.OnClickListener
private ViewPager mMainViewPager; private ViewPager mMainViewPager;
private GeneralMemberFragment mGeneralMemberFragment; private GeneralMemberFragment mGeneralMemberFragment;
private SuperMemberFragment mSuperMemberFragment; private SuperMember2Fragment mSuperMemberFragment;
private List<Fragment> mChannelFragments = new ArrayList<>(); private List<Fragment> mChannelFragments = new ArrayList<>();
private MainViewPagerAdapter mViewPagerAdapter; private MainViewPagerAdapter mViewPagerAdapter;
@@ -70,11 +70,11 @@ public class MemberActivity extends BaseActivity implements View.OnClickListener
mGeneralMemberFragment = new GeneralMemberFragment(); mGeneralMemberFragment = new GeneralMemberFragment();
mGeneralMemberFragment.setOnScrollChange(this); mGeneralMemberFragment.setOnScrollChange(this);
mSuperMemberFragment = new SuperMemberFragment(); mSuperMemberFragment = new SuperMember2Fragment();
mSuperMemberFragment.setOnScrollChange(this); mSuperMemberFragment.setOnScrollChange(this);
mChannelFragments.add(mGeneralMemberFragment); mChannelFragments.add(mGeneralMemberFragment);
// mChannelFragments.add(mSuperMemberFragment); mChannelFragments.add(mSuperMemberFragment);
mViewPagerAdapter = new MainViewPagerAdapter(getSupportFragmentManager(), mViewPagerAdapter = new MainViewPagerAdapter(getSupportFragmentManager(),
mChannelFragments); mChannelFragments);
@@ -106,31 +106,31 @@ public class MemberActivity extends BaseActivity implements View.OnClickListener
private void viewPagerChange(int index) { private void viewPagerChange(int index) {
switch (index) { switch (index) {
case 0: case 0:
title_name_1.setTextColor(Color.parseColor("#643406")); title_name_1.setTextColor(Color.WHITE);
title_name_1.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));//加粗 title_name_1.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));//加粗
title_bottom_line_1.setVisibility(View.VISIBLE); title_bottom_line_1.setVisibility(View.VISIBLE);
title_name_2.setTextColor(Color.parseColor("#9C8D76")); title_name_2.setTextColor(Color.parseColor("#80ffffff"));
title_name_2.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL)); title_name_2.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
title_bottom_line_2.setVisibility(View.INVISIBLE); title_bottom_line_2.setVisibility(View.INVISIBLE);
// tv_member_title.setTextColor(Color.BLACK); // tv_member_title.setTextColor(Color.BLACK);
// iv_member_back.setImageResource(R.drawable.ic_return); // iv_member_back.setImageResource(R.drawable.ic_return);
mGeneralMemberFragment.scrollTop(); // mGeneralMemberFragment.scrollTop();
tv_member_title_bg.setAlpha(0); tv_member_title_bg.setAlpha(0);
break; break;
case 1: case 1:
title_name_2.setTextColor(Color.parseColor("#FFE5C2")); title_name_2.setTextColor(Color.WHITE);
title_name_2.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); title_name_2.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
title_bottom_line_2.setVisibility(View.VISIBLE); title_bottom_line_2.setVisibility(View.VISIBLE);
title_name_1.setTextColor(Color.parseColor("#9E94B0")); title_name_1.setTextColor(Color.parseColor("#80ffffff"));
title_name_1.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));//加粗 title_name_1.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));//加粗
title_bottom_line_1.setVisibility(View.INVISIBLE); title_bottom_line_1.setVisibility(View.INVISIBLE);
tv_member_title.setTextColor(Color.parseColor("#F3E9F9")); // tv_member_title.setTextColor(Color.parseColor("#F3E9F9"));
iv_member_back.setImageResource(R.drawable.ic_return_white); // iv_member_back.setImageResource(R.drawable.ic_return_white);
mSuperMemberFragment.scrollTop(); // mSuperMemberFragment.scrollTop();
tv_member_title_bg.setAlpha(0); tv_member_title_bg.setAlpha(0);
break; break;

View File

@@ -127,6 +127,7 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
private boolean isVip; private boolean isVip;
private LinearLayout ll_go_edit_layout; private LinearLayout ll_go_edit_layout;
private String mUsercode; private String mUsercode;
private TextView mTv_go_open;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -195,6 +196,7 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
tv_go_homepage = v.findViewById(R.id.tv_go_homepage); tv_go_homepage = v.findViewById(R.id.tv_go_homepage);
ll_mine_video_chat = v.findViewById(R.id.ll_mine_video_chat); ll_mine_video_chat = v.findViewById(R.id.ll_mine_video_chat);
mTv_go_open = v.findViewById(R.id.tv_go_open);
rl_user_info.setOnClickListener(this); rl_user_info.setOnClickListener(this);
ll_go_edit_layout.setOnClickListener(this); ll_go_edit_layout.setOnClickListener(this);
@@ -264,14 +266,17 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
isVip = true; isVip = true;
iv_user_icon1.setVisibility(View.VISIBLE); iv_user_icon1.setVisibility(View.VISIBLE);
iv_user_icon2.setVisibility(View.GONE); iv_user_icon2.setVisibility(View.GONE);
mTv_go_open.setText("已开通VIP");
} else if (1 == result.getUserinfo().getVip()) { } else if (1 == result.getUserinfo().getVip()) {
isVip = true; isVip = true;
iv_user_icon1.setVisibility(View.GONE); iv_user_icon1.setVisibility(View.GONE);
iv_user_icon2.setVisibility(View.VISIBLE); iv_user_icon2.setVisibility(View.VISIBLE);
mTv_go_open.setText("已开通SVIP");
} else { } else {
isVip = false; isVip = false;
iv_user_icon1.setVisibility(View.GONE); iv_user_icon1.setVisibility(View.GONE);
iv_user_icon2.setVisibility(View.GONE); iv_user_icon2.setVisibility(View.GONE);
mTv_go_open.setText("立即开通");
} }
SPUtils.saveBoolean(getActivity(), ConsUser.USER_VIP, isVip); SPUtils.saveBoolean(getActivity(), ConsUser.USER_VIP, isVip);
SPUtils.saveString(getActivity(), ConsUser.HIDE_READ_MSG, result.getHide_read_msg()); SPUtils.saveString(getActivity(), ConsUser.HIDE_READ_MSG, result.getHide_read_msg());

View File

@@ -0,0 +1,598 @@
package com.xuebiping.bolizhuzi.view.settings;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.graphics.Paint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alipay.sdk.app.PayTask;
import com.facebook.drawee.view.SimpleDraweeView;
import com.fengliyan.uikit.toast.MaleToast;
import com.sand.qzf.paytypesdk.base.CallBack;
import com.sand.qzf.paytypesdk.base.PayTypeSdk;
import com.sand.qzf.paytypesdk.base.Resp;
import com.tencent.mm.opensdk.modelpay.PayReq;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.xuebiping.bolizhuzi.R;
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
import com.xuebiping.bolizhuzi.controller.constant.Constant;
import com.xuebiping.bolizhuzi.controller.eventBus.PayEvent;
import com.xuebiping.bolizhuzi.controller.settings.adapter.GeneralOptionsRecyclerAdapter;
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
import com.xuebiping.bolizhuzi.model.settings.MemberBean;
import com.xuebiping.bolizhuzi.model.settings.MemberInfoList;
import com.xuebiping.bolizhuzi.model.settings.MemberPrivilegesInfo;
import com.xuebiping.bolizhuzi.model.settings.PayBean;
import com.xuebiping.bolizhuzi.model.settings.PayConfigBean;
import com.xuebiping.bolizhuzi.model.settings.WXPayTypeBean;
import com.xuebiping.bolizhuzi.model.settings.WeChatPayInfoBean;
import com.xuebiping.bolizhuzi.utils.PayUtils;
import com.xuebiping.bolizhuzi.utils.SPUtils;
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
import com.xuebiping.bolizhuzi.view.base.PayWebViewActivity;
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
import com.xuebiping.bolizhuzi.view.base.utils.view.MemberPayDialog;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import de.greenrobot.event.EventBus;
public class SuperMember2Fragment extends Fragment implements View.OnClickListener {
private NestedScrollView sv_general_member;
private TextView tv_member_time;
private ConstraintLayout lin_vip_shift1, lin_vip_shift2, lin_vip_shift3;
private TextView tv_vip_shift_name1, tv_vip_shift_name2, tv_vip_shift_name3;
private TextView tv_vip_price1, tv_vip_price2, tv_vip_price3;
private TextView tv_vip_price_hint1, tv_vip_price_hint2, tv_vip_price_hint3;
private RecyclerView mOptionView;
private TextView tv_member_setting;
private LinearLayout lin_member_bottom_btn;
private TextView tv_member_open;
private TextView tv_member_sure;
private GeneralOptionsRecyclerAdapter mAdapter;
private int type = 1;
private List<MemberPrivilegesInfo> mPrivileges = new ArrayList<>();
private Boolean isVip = false;
private String mSelectedPayMethod = "alipay"; //默认微信
private MemberPayDialog mPayDialog;
boolean isWXHF;//微信支付是否是走汇付的微信小程序
private String ghOriId;
private int mini_program_type;
private int goodsId;
private int goodsId1;
private int goodsId2;
private int goodsId3;
private String price;
private String price1;
private String price2;
private String price3;
private int defaultType = 0;//默认选中会员类型
private GeneralMemberFragment.OnScrollChange onScrollChange;
private SimpleDraweeView mUser_head;
private TextView mTv_notice;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_super_member2, container, false);
EventBus.getDefault().register(this);
initView(v);
// getData(type);
getWXPayType();
return v;
}
private void initView(View v) {
sv_general_member = v.findViewById(R.id.sv_general_member);
tv_member_setting = v.findViewById(R.id.tv_member_setting);
lin_member_bottom_btn = v.findViewById(R.id.lin_member_bottom_btn);
tv_member_open = v.findViewById(R.id.tv_member_open);
tv_member_sure = v.findViewById(R.id.tv_member_sure);
mUser_head = v.findViewById(R.id.user_head);
tv_member_time = v.findViewById(R.id.tv_member_time);
lin_vip_shift1 = v.findViewById(R.id.lin_vip_shift1);
tv_vip_shift_name1 = v.findViewById(R.id.tv_vip_shift_name1);
tv_vip_price1 = v.findViewById(R.id.tv_vip_price1);
tv_vip_price_hint1 = v.findViewById(R.id.tv_vip_price_hint1);
lin_vip_shift2 = v.findViewById(R.id.lin_vip_shift2);
tv_vip_shift_name2 = v.findViewById(R.id.tv_vip_shift_name2);
tv_vip_price2 = v.findViewById(R.id.tv_vip_price2);
tv_vip_price_hint2 = v.findViewById(R.id.tv_vip_price_hint2);
lin_vip_shift3 = v.findViewById(R.id.lin_vip_shift3);
tv_vip_shift_name3 = v.findViewById(R.id.tv_vip_shift_name3);
tv_vip_price3 = v.findViewById(R.id.tv_vip_price3);
tv_vip_price_hint3 = v.findViewById(R.id.tv_vip_price_hint3);
mOptionView = v.findViewById(R.id.general_recycler_view);
mTv_notice = v.findViewById(R.id.tv_notice);
mOptionView.setLayoutManager(new GridLayoutManager(requireContext(), 3));
if (null == mAdapter) {
mAdapter = new GeneralOptionsRecyclerAdapter(getActivity(), 1);
mAdapter.setOptions(mPrivileges);
mOptionView.setAdapter(mAdapter);
mOptionView.setNestedScrollingEnabled(true);
}
tv_vip_price_hint1.setPaintFlags(tv_vip_price_hint1.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
tv_vip_price_hint2.setPaintFlags(tv_vip_price_hint2.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
tv_vip_price_hint3.setPaintFlags(tv_vip_price_hint3.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
lin_vip_shift1.setOnClickListener(this);
lin_vip_shift2.setOnClickListener(this);
lin_vip_shift3.setOnClickListener(this);
tv_member_setting.setOnClickListener(this);
tv_member_sure.setOnClickListener(this);
tv_member_open.setOnClickListener(this);
sv_general_member.setNestedScrollingEnabled(true);
// sv_general_member.setOnScrollChangeListener(new View.OnScrollChangeListener() {
// @Override
// public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
// if (onScrollChange != null) {
// onScrollChange.scrollChange(scrollY);
// }
// }
// });
}
private void getData(int type) {
SettingManager.getMemberInfo((BaseActivity) getActivity(), type, new HttpUiCallBack<MemberBean>() {
@Override
public void onSuccess(BaseActivity activity, MemberBean result, String message) {
mTv_notice.setText(result.getNotice());
if (result.getInfo() != null) {
mUser_head.setImageURI(ConstUrl.IMAGE_URL + result.getInfo().getAvatar());
if (!TextUtils.isEmpty(result.getInfo().getExpire_date_new())) {
tv_member_time.setText("有效期至:" + result.getInfo().getExpire_date_new());
isVip = true;
lin_member_bottom_btn.setVisibility(View.VISIBLE);
tv_member_open.setVisibility(View.GONE);
} else {
tv_member_time.setText("你还未开通SVIP");
isVip = false;
lin_member_bottom_btn.setVisibility(View.GONE);
tv_member_open.setVisibility(View.VISIBLE);
tv_member_open.setText("立即开通");
}
// SPUtils.saveBoolean(getActivity(), ConsUser.USER_VIP, isVip);
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
lin_member_bottom_btn.setVisibility(View.GONE);
tv_member_open.setVisibility(View.VISIBLE);
tv_member_open.setText("邀请好友开通");
}
List<MemberInfoList> list = result.getInfo().getList();
if (list != null && list.size() > 0) {
if (list.size() == 1) {
lin_vip_shift1.setVisibility(View.VISIBLE);
lin_vip_shift2.setVisibility(View.GONE);
lin_vip_shift3.setVisibility(View.GONE);
price1 = (int) Double.parseDouble(list.get(0).getPrice()) + list.get(0).getExpires_title();
tv_vip_shift_name1.setText(list.get(0).getName());
tv_vip_price1.setText((int) Double.parseDouble(list.get(0).getPrice()) + "");
tv_vip_price_hint1.setText("原价¥" + list.get(0).getOrigin_price());
goodsId1 = list.get(0).getId();
}else if (list.size() == 2) {
lin_vip_shift1.setVisibility(View.VISIBLE);
lin_vip_shift2.setVisibility(View.VISIBLE);
lin_vip_shift3.setVisibility(View.GONE);
price1 = (int) Double.parseDouble(list.get(0).getPrice()) + list.get(0).getExpires_title();
tv_vip_shift_name1.setText(list.get(0).getName());
tv_vip_price1.setText((int) Double.parseDouble(list.get(0).getPrice()) + "");
tv_vip_price_hint1.setText("原价¥" + list.get(0).getOrigin_price());
price2 = (int) Double.parseDouble(list.get(1).getPrice()) + list.get(1).getExpires_title();
tv_vip_shift_name2.setText(list.get(1).getName());
tv_vip_price2.setText((int) Double.parseDouble(list.get(1).getPrice()) + "");
tv_vip_price_hint2.setText("原价¥" + list.get(1).getOrigin_price());
goodsId1 = list.get(0).getId();
goodsId2 = list.get(1).getId();
}else {
lin_vip_shift1.setVisibility(View.VISIBLE);
lin_vip_shift2.setVisibility(View.VISIBLE);
lin_vip_shift3.setVisibility(View.VISIBLE);
price1 = (int) Double.parseDouble(list.get(0).getPrice()) + list.get(0).getExpires_title();
tv_vip_shift_name1.setText(list.get(0).getName());
tv_vip_price1.setText((int) Double.parseDouble(list.get(0).getPrice()) + "");
tv_vip_price_hint1.setText("原价¥" + list.get(0).getOrigin_price());
price2 = (int) Double.parseDouble(list.get(1).getPrice()) + list.get(1).getExpires_title();
tv_vip_shift_name2.setText(list.get(1).getName());
tv_vip_price2.setText((int) Double.parseDouble(list.get(1).getPrice()) + "");
tv_vip_price_hint2.setText("原价¥" + list.get(1).getOrigin_price());
price3 = (int) Double.parseDouble(list.get(2).getPrice()) + list.get(2).getExpires_title();
tv_vip_shift_name3.setText(list.get(2).getName());
tv_vip_price3.setText((int) Double.parseDouble(list.get(2).getPrice()) + "");
tv_vip_price_hint3.setText("原价¥" + list.get(2).getOrigin_price());
goodsId1 = list.get(0).getId();
goodsId2 = list.get(1).getId();
goodsId3 = list.get(2).getId();
}
}
mAdapter.setVip_day_free_send(result.getInfo().getVip_day_free_send());
}
mPrivileges.clear();
// for (int i = 0; i < 6; i++) {
// MemberPrivilegesInfo info = new MemberPrivilegesInfo();
// info.setId(i);
// if (i == 0) {
// info.setDesc("半价无限畅聊");
// }
// if (i == 1) {
// info.setDesc("每日可享1次免费视频单次最长1分钟");
// }
//// if (i == 2 && isVip) {
//// info.setName("VISIBLE");
//// }
// mPrivileges.add(info);
// }
mPrivileges.addAll(result.getPrivileges());
mAdapter.setOptions(mPrivileges);
}
@Override
public void onFailure(BaseActivity activity, String tip) {
}
@Override
public void onException(BaseActivity activity, Throwable e) {
}
});
}
@Override
public void onClick(View v) {
if (v == tv_member_setting) {
Intent intent = new Intent(getContext(), PrivilegeSettingActivity.class);
intent.putExtra("isVip", isVip);
startActivity(intent);
} else if (v == lin_vip_shift1) {
lin_vip_shift1.setBackgroundResource(R.drawable.vip_select_bg2);
lin_vip_shift2.setBackgroundResource(R.drawable.vip_select_bg1);
lin_vip_shift3.setBackgroundResource(R.drawable.vip_select_bg1);
defaultType = 0;
if (goodsId1 == 1011) {
List<MemberPrivilegesInfo> list = mAdapter.getmOptions();
list.get(0).setDesc("半价无限畅聊");
list.get(1).setDesc("每日可享1次免费视频单次最长1分钟");
mAdapter.setOptions(list);
}
} else if (v == lin_vip_shift2) {
lin_vip_shift1.setBackgroundResource(R.drawable.vip_select_bg1);
lin_vip_shift2.setBackgroundResource(R.drawable.vip_select_bg2);
lin_vip_shift3.setBackgroundResource(R.drawable.vip_select_bg1);
defaultType = 1;
if (goodsId2 == 1012) {
List<MemberPrivilegesInfo> list = mAdapter.getmOptions();
list.get(0).setDesc("半价无限畅聊");
list.get(1).setDesc("每日可享2次免费视频单次最长1分钟");
mAdapter.setOptions(list);
}
} else if (v == lin_vip_shift3) {
lin_vip_shift1.setBackgroundResource(R.drawable.vip_select_bg1);
lin_vip_shift2.setBackgroundResource(R.drawable.vip_select_bg1);
lin_vip_shift3.setBackgroundResource(R.drawable.vip_select_bg2);
defaultType = 2;
if (goodsId3 == 1013) {
List<MemberPrivilegesInfo> list = mAdapter.getmOptions();
list.get(0).setDesc("尊享无限文字畅聊");
list.get(1).setDesc("每日可享3次免费视频单次最长1分钟");
mAdapter.setOptions(list);
}
} else if (v == tv_member_sure) {
if (defaultType == 1) {
goodsId = goodsId2;
price = price2;
} else if (defaultType == 2) {
goodsId = goodsId3;
price = price3;
} else {
goodsId = goodsId1;
price = price1;
}
showPay(goodsId);
} else if (v == tv_member_open) {
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
Intent intent = new Intent(getContext(), InvitationActivity.class);
startActivity(intent);
} else {
if (defaultType == 1) {
goodsId = goodsId2;
price = price2;
} else if (defaultType == 2) {
goodsId = goodsId3;
price = price3;
} else {
goodsId = goodsId1;
price = price1;
}
showPay(goodsId);
}
}
}
/**
* 支付方式
*/
private void showPay(final int id) {
SettingManager.payConfig((BaseActivity) getActivity(), new HttpUiCallBack<PayConfigBean>() {
@Override
public void onSuccess(BaseActivity activity, PayConfigBean result, String tips) {
mPayDialog = new MemberPayDialog(getActivity(), result, "VIP " + price);
mPayDialog.setOnClickPayListener(new MemberPayDialog.OnClickPayListener() {
@Override
public void onClickPayListener(String selectedPayMethod) {
mSelectedPayMethod = selectedPayMethod;
confirmToPay(id);
mPayDialog.dismiss();
}
});
mPayDialog.show();
}
@Override
public void onFailure(BaseActivity activity, String tip) {
MaleToast.showMessage(activity, tip);
}
@Override
public void onException(BaseActivity activity, Throwable e) {
MaleToast.showMessage(activity, "获取支付信息失败");
}
});
}
private String mOrderInfo;
public static int SDK_PAY_FLAG = 101;
private Runnable mPayRunnable = new Runnable() {
@Override
public void run() {
PayTask alipay = new PayTask(getActivity());
Map<String, String> result = alipay.payV2(mOrderInfo, true);
String code = result.get("resultStatus");
if (!TextUtils.isEmpty(code)) {
if ("9000".equals(code)) {
Message msg = new Message();
msg.what = SDK_PAY_FLAG;
msg.obj = result;
mHandler.sendMessage(msg);
}
}
}
};
@SuppressLint("HandlerLeak")
private Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
if (msg.what == SDK_PAY_FLAG) {
getData(type);
}
}
};
void getWXPayType() {
SettingManager.getWechatPaySite((BaseActivity) getActivity(), new HttpUiCallBack<WXPayTypeBean>() {
@Override
public void onSuccess(BaseActivity activity, WXPayTypeBean result, String tips) {
isWXHF = result.getWechat_type() == 3;
ghOriId = result.getGh_ori_id();
mini_program_type = result.getMini_program_type();
}
@Override
public void onFailure(BaseActivity activity, String tip) {
}
@Override
public void onException(BaseActivity activity, Throwable e) {
}
});
}
private void confirmToPay(int id) {
if (isWXHF && mSelectedPayMethod.equals("wechat")) {
PayUtils.wxminiPay(getActivity(), id, 1, ghOriId, mini_program_type);
return;
}
SettingManager.payToRecharge((BaseActivity) getActivity(), mSelectedPayMethod,
id + "", 1, new HttpUiCallBack<PayBean>() {
@Override
public void onSuccess(BaseActivity activity, PayBean result, String message) {
if ("alipay".equals(mSelectedPayMethod)) {
if (result.getPay_platform_type() == 1) {
if (null != result.getPayinfo()) {
mOrderInfo = result.getPayinfo();
Thread payThread = new Thread(mPayRunnable);
payThread.start();
}
} else if (result.getPay_platform_type() == 2) {
if (null != result.getPayinfo()) {
mOrderInfo = result.getPayinfo();
PayUtils.ailWeb(mOrderInfo, getActivity());
}
} else if (result.getPay_platform_type() == 4) {
Intent intent = new Intent(getActivity(), PayWebViewActivity.class);
intent.putExtra("ClickUrl", result.getKqPayInfo());
getActivity().startActivity(intent);
} else if (result.getPay_platform_type() == 5) {
PayUtils.SFTPay(getActivity(), result.getPayinfo());
} else {
PayTypeSdk.getInstance().cashierPay(getActivity(), result.getSandpayinfo().getCashierUrl(), new CallBack() {
@Override
public void onResult(Resp resp) {
if (resp.status.equals(Resp.SUCCESS) || resp.status.equals(Resp.FINISH)) {
getData(type);
}
}
});
}
} else if ("wechat".equals(mSelectedPayMethod)) {
if (result.getPay_platform_type() == 1) {
IWXAPI wxapi = WXAPIFactory.createWXAPI(getActivity(), Constant.WECHAT_APP_ID, false);
WeChatPayInfoBean wechatpayinfo = result.getWechatpayinfo();
//调起微信支付
PayReq req = new PayReq();
req.appId = Constant.WECHAT_APP_ID;
req.partnerId = wechatpayinfo.getMch_id(); //商户号
req.prepayId = wechatpayinfo.getPrepay_id(); //预付款id
req.nonceStr = wechatpayinfo.getNonce_str();
req.timeStamp = wechatpayinfo.getTimestamp() + "";
req.packageValue = "Sign=WXPay"; //固定值
req.sign = wechatpayinfo.getPaySign();
//先检测是否安装了微信
boolean isWXAppInstalledAndSupported = wxapi.isWXAppInstalled();
if (isWXAppInstalledAndSupported) {
wxapi.registerApp(Constant.WECHAT_APP_ID);
wxapi.sendReq(req);
} else {
MaleToast.showMessage(getActivity(), "未安装微信,不能支付");
}
} else if (result.getPay_platform_type() == 2) {
PayTypeSdk.getInstance().cashierPay(getActivity(), result.getSandpayinfo().getCashierUrl(), new CallBack() {
@Override
public void onResult(Resp resp) {
if (resp.status.equals(Resp.SUCCESS) || resp.status.equals(Resp.FINISH)) {
}
}
});
} else if (result.getPay_platform_type() == 4) {
Intent intent = new Intent(getContext(), PayWebViewActivity.class);
intent.putExtra("ClickUrl", result.getKqPayInfo());
getActivity().startActivity(intent);
} else if (result.getPay_platform_type() == 5) {
PayUtils.SFTPay(getActivity(), result.getPayinfo());
}
}
}
@Override
public void onFailure(BaseActivity activity, String tip) {
Log.e("", "");
}
@Override
public void onException(BaseActivity activity, Throwable e) {
Log.e("", "");
}
});
}
private void memberAuthority(final String type, final int value) {
SettingManager.memberAuthority((BaseActivity) getActivity(), type, value, new HttpUiCallBack<Object>() {
@Override
public void onSuccess(BaseActivity activity, Object result, String message) {
}
@Override
public void onFailure(BaseActivity activity, String tip) {
MaleToast.showMessage(activity, tip);
}
@Override
public void onException(BaseActivity activity, Throwable e) {
MaleToast.showMessage(activity, "请重试");
}
});
}
//微信支付成功后回调
public void onEventMainThread(PayEvent event) {
int errCode = event.getErrCode();
if (errCode == 0) {
MaleToast.showSuccessMsg(getActivity(), "充值成功");
getData(type);
} else if (errCode == -2) {
MaleToast.showFailureMsg(getActivity(), "充值取消");
} else {
MaleToast.showFailureMsg(getActivity(), "充值失败");
}
}
@Override
public void onResume() {
super.onResume();
getData(type);
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
if (null != mPayDialog && mPayDialog.isShowing()) {
mPayDialog.dismiss();
}
}
public void scrollTop() {
// if (sv_general_member != null) {
// sv_general_member.post(new Runnable() {
// @Override
// public void run() {
// sv_general_member.smoothScrollTo(0, 0);
// }
// });
// }
}
public interface OnScrollChange {
void scrollChange(int i);
}
public void setOnScrollChange(GeneralMemberFragment.OnScrollChange onScrollChange) {
this.onScrollChange = onScrollChange;
}
}

View File

@@ -14,14 +14,17 @@ import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.NestedScrollView; import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager; import androidx.recyclerview.widget.StaggeredGridLayoutManager;
import com.alipay.sdk.app.PayTask; import com.alipay.sdk.app.PayTask;
import com.facebook.drawee.view.SimpleDraweeView;
import com.xuebiping.bolizhuzi.R; import com.xuebiping.bolizhuzi.R;
import com.xuebiping.bolizhuzi.controller.constant.ConsUser; import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
import com.xuebiping.bolizhuzi.controller.constant.Constant; import com.xuebiping.bolizhuzi.controller.constant.Constant;
import com.xuebiping.bolizhuzi.controller.eventBus.PayEvent; import com.xuebiping.bolizhuzi.controller.eventBus.PayEvent;
import com.xuebiping.bolizhuzi.controller.settings.adapter.GeneralOptionsRecyclerAdapter; import com.xuebiping.bolizhuzi.controller.settings.adapter.GeneralOptionsRecyclerAdapter;
@@ -61,7 +64,7 @@ import de.greenrobot.event.EventBus;
public class SuperMemberFragment extends Fragment implements View.OnClickListener { public class SuperMemberFragment extends Fragment implements View.OnClickListener {
private NestedScrollView sv_super_member;
private TextView tv_member_time; private TextView tv_member_time;
private ImageView iv_plus_tips; private ImageView iv_plus_tips;
private RecyclerView mOptionView; private RecyclerView mOptionView;
@@ -70,7 +73,7 @@ public class SuperMemberFragment extends Fragment implements View.OnClickListene
private TextView tv_super_member_price; private TextView tv_super_member_price;
private TextView tv_super_member_sure; private TextView tv_super_member_sure;
private GeneralOptionsRecyclerAdapter mAdapter; private GeneralOptionsRecyclerAdapter mAdapter;
private int type = 5; private int type = 1;
private List<MemberPrivilegesInfo> mPrivileges = new ArrayList<>(); private List<MemberPrivilegesInfo> mPrivileges = new ArrayList<>();
@@ -81,7 +84,15 @@ public class SuperMemberFragment extends Fragment implements View.OnClickListene
private int mini_program_type; private int mini_program_type;
private OnScrollChange onScrollChange; private OnScrollChange onScrollChange;
private int goodsId; private int goodsId;
private int goodsId1;
private int goodsId2;
private int goodsId3;
private String price; private String price;
private int defaultType = 0;//默认选中会员类型
private SimpleDraweeView mUser_head;
private ConstraintLayout lin_vip_shift1, lin_vip_shift2, lin_vip_shift3;
private TextView tv_vip_shift_name1, tv_vip_shift_name2, tv_vip_shift_name3;
@Nullable @Nullable
@Override @Override
@@ -115,14 +126,23 @@ public class SuperMemberFragment extends Fragment implements View.OnClickListene
} }
private void initView(View v) { private void initView(View v) {
sv_super_member = v.findViewById(R.id.sv_super_member);
tv_member_time = v.findViewById(R.id.tv_member_time);
iv_plus_tips = v.findViewById(R.id.iv_plus_tips); iv_plus_tips = v.findViewById(R.id.iv_plus_tips);
tv_super_member_setting = v.findViewById(R.id.tv_super_member_setting); tv_super_member_setting = v.findViewById(R.id.tv_super_member_setting);
rl_super_member_bottom = v.findViewById(R.id.rl_super_member_bottom); rl_super_member_bottom = v.findViewById(R.id.rl_super_member_bottom);
tv_super_member_price = v.findViewById(R.id.tv_super_member_price); tv_super_member_price = v.findViewById(R.id.tv_super_member_price);
tv_super_member_sure = v.findViewById(R.id.tv_super_member_sure); tv_super_member_sure = v.findViewById(R.id.tv_super_member_sure);
mOptionView = v.findViewById(R.id.general_recycler_view); mOptionView = v.findViewById(R.id.general_recycler_view);
mUser_head = v.findViewById(R.id.user_head);
tv_member_time = v.findViewById(R.id.tv_member_time);
lin_vip_shift1 = v.findViewById(R.id.lin_vip_shift1);
tv_vip_shift_name1 = v.findViewById(R.id.tv_vip_shift_name1);
// tv_vip_price1 = v.findViewById(R.id.tv_vip_price1);
// tv_vip_price_hint1 = v.findViewById(R.id.tv_vip_price_hint1);
mOptionView.setLayoutManager(new StaggeredGridLayoutManager(2, mOptionView.setLayoutManager(new StaggeredGridLayoutManager(2,
StaggeredGridLayoutManager.VERTICAL) { StaggeredGridLayoutManager.VERTICAL) {
@Override @Override
@@ -141,20 +161,26 @@ public class SuperMemberFragment extends Fragment implements View.OnClickListene
iv_plus_tips.setOnClickListener(this); iv_plus_tips.setOnClickListener(this);
tv_super_member_sure.setOnClickListener(this); tv_super_member_sure.setOnClickListener(this);
tv_super_member_setting.setOnClickListener(this); tv_super_member_setting.setOnClickListener(this);
sv_super_member.setOnScrollChangeListener(new View.OnScrollChangeListener() {
@Override lin_vip_shift1.setOnClickListener(this);
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
if (onScrollChange != null) { // sv_super_member.setOnScrollChangeListener(new View.OnScrollChangeListener() {
onScrollChange.scrollChange(scrollY); // @Override
} // public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
} // if (onScrollChange != null) {
}); // onScrollChange.scrollChange(scrollY);
// }
// }
// });
} }
private void getData(int type) { private void getData(int type) {
SettingManager.getMemberInfo((BaseActivity) getActivity(), type, new HttpUiCallBack<MemberBean>() { SettingManager.getMemberInfo((BaseActivity) getActivity(), type, new HttpUiCallBack<MemberBean>() {
@Override @Override
public void onSuccess(BaseActivity activity, MemberBean result, String message) { public void onSuccess(BaseActivity activity, MemberBean result, String message) {
mUser_head.setImageURI(ConstUrl.IMAGE_URL + result.getInfo().getAvatar());
if (result.getInfo() != null) { if (result.getInfo() != null) {
if (!TextUtils.isEmpty(result.getInfo().getExpire_date_new())) { if (!TextUtils.isEmpty(result.getInfo().getExpire_date_new())) {
tv_member_time.setText("有效期至:" + result.getInfo().getExpire_date_new()); tv_member_time.setText("有效期至:" + result.getInfo().getExpire_date_new());
@@ -162,12 +188,12 @@ public class SuperMemberFragment extends Fragment implements View.OnClickListene
rl_super_member_bottom.setVisibility(View.GONE); rl_super_member_bottom.setVisibility(View.GONE);
tv_super_member_setting.setVisibility(View.VISIBLE); tv_super_member_setting.setVisibility(View.VISIBLE);
} else { } else {
tv_member_time.setText("1000+用户已开通"); tv_member_time.setText("你还未开通SVIP");
isVip = false; isVip = false;
rl_super_member_bottom.setVisibility(View.VISIBLE); rl_super_member_bottom.setVisibility(View.VISIBLE);
tv_super_member_setting.setVisibility(View.GONE); tv_super_member_setting.setVisibility(View.GONE);
} }
SPUtils.saveBoolean(getActivity(), ConsUser.USER_VIP, isVip); // SPUtils.saveBoolean(getActivity(), ConsUser.USER_VIP, isVip);
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) { if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
rl_super_member_bottom.setVisibility(View.VISIBLE); rl_super_member_bottom.setVisibility(View.VISIBLE);
tv_super_member_setting.setVisibility(View.GONE); tv_super_member_setting.setVisibility(View.GONE);
@@ -223,6 +249,17 @@ public class SuperMemberFragment extends Fragment implements View.OnClickListene
Intent intent = new Intent(getContext(), PrivilegeSettingActivity.class); Intent intent = new Intent(getContext(), PrivilegeSettingActivity.class);
intent.putExtra("isVip", isVip); intent.putExtra("isVip", isVip);
startActivity(intent); startActivity(intent);
}else if (v == lin_vip_shift1) {
lin_vip_shift1.setBackgroundResource(R.drawable.vip_select_bg2);
lin_vip_shift2.setBackgroundResource(R.drawable.vip_select_bg1);
lin_vip_shift3.setBackgroundResource(R.drawable.vip_select_bg1);
defaultType = 0;
if (goodsId1 == 1011) {
List<MemberPrivilegesInfo> list = mAdapter.getmOptions();
list.get(0).setDesc("半价无限畅聊");
list.get(1).setDesc("每日可享1次免费视频单次最长1分钟");
mAdapter.setOptions(list);
}
} }
} }
@@ -448,16 +485,16 @@ public class SuperMemberFragment extends Fragment implements View.OnClickListene
} }
} }
public void scrollTop() { // public void scrollTop() {
if (sv_super_member != null) { // if (sv_super_member != null) {
sv_super_member.post(new Runnable() { // sv_super_member.post(new Runnable() {
@Override // @Override
public void run() { // public void run() {
sv_super_member.smoothScrollTo(0, 0); // sv_super_member.smoothScrollTo(0, 0);
} // }
}); // });
} // }
} // }
public interface OnScrollChange { public interface OnScrollChange {
void scrollChange(int i); void scrollChange(int i);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 171 KiB

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="2dp"/> <corners android:radius="2dp"/>
<solid android:color="#FFE5C2"/> <solid android:color="@color/white"/>
</shape> </shape>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="2dp"/> <corners android:radius="2dp"/>
<solid android:color="#643406"/> <solid android:color="@color/white"/>
</shape> </shape>

View File

@@ -56,7 +56,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_member_title"> app:layout_constraintTop_toBottomOf="@+id/tv_member_title">
@@ -73,8 +72,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:text="普通会员" android:text="VIP"
android:textColor="@color/three_text" android:textColor="@color/white"
android:textSize="18sp" /> android:textSize="18sp" />
<View <View
@@ -99,8 +98,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:text="超级会员" android:text="SVIP"
android:textColor="@color/three_text" android:textColor="@color/white"
android:textSize="18sp" /> android:textSize="18sp" />
<View <View

View File

@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fresco="http://schemas.android.com/apk/res-auto" xmlns:fresco="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:viewBindingIgnore="true"> tools:viewBindingIgnore="true">
<!-- <androidx.core.widget.NestedScrollView--> <androidx.core.widget.NestedScrollView
<!-- android:id="@+id/sv_general_member"--> android:id="@+id/sv_general_member"
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="match_parent"--> android:layout_height="match_parent"
<!-- android:layout_alignParentTop="true"--> android:fillViewport="true"
<!-- android:background="@mipmap/ly_ic_member_vip"--> android:scrollbars="none">
<!-- android:scrollbars="none">-->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -25,90 +25,77 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="180dp"
android:layout_marginTop="50dp"> android:layout_marginLeft="16dp"
android:layout_marginTop="150dp"
android:layout_marginRight="16dp"
android:background="@drawable/ic_general_member_header_bg">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginLeft="16dp"
android:layout_marginTop="57dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginRight="16dp"
android:background="@drawable/ic_general_member_header_bg" android:gravity="center_vertical"
android:orientation="vertical"> android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_vip_tag" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginLeft="6dp"
android:layout_marginTop="20dp" android:layout_weight="1"
android:text="VIP享专属特权" android:text="特权"
android:textColor="#FFD692" android:textColor="@color/white"
android:textSize="20dp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
<RelativeLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:gravity="center_vertical"
android:layout_marginTop="10dp"> android:orientation="horizontal">
<ImageView <com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/member_my_photo1" android:id="@+id/user_head"
android:layout_width="26dp" android:layout_width="16dp"
android:layout_height="26dp" android:layout_height="16dp"
android:src="@drawable/ic_member_photo1" /> android:scaleType="fitXY"
app:roundAsCircle="true"
<ImageView app:roundingBorderColor="@color/white"
android:id="@+id/member_my_photo2" app:roundingBorderWidth="2dp" />
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginStart="-8dp"
android:layout_toEndOf="@+id/member_my_photo1"
android:src="@drawable/ic_member_photo2" />
<ImageView
android:id="@+id/member_my_photo3"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginStart="-8dp"
android:layout_toEndOf="@+id/member_my_photo2"
android:src="@drawable/ic_member_photo3" />
</RelativeLayout>
<TextView <TextView
android:id="@+id/tv_member_time" android:id="@+id/tv_member_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginLeft="6dp"
android:layout_marginTop="10dp" android:text="你还未开通VIP"
android:layout_marginBottom="14dp" android:textColor="@color/white"
android:text="1000+用户已开通" android:textSize="16sp"
android:textColor="#80FFFFFF" android:textStyle="bold" />
android:textSize="12dp" /> </LinearLayout>
</LinearLayout> </LinearLayout>
<ImageView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_centerInParent="true"
android:layout_marginEnd="8dp" android:text="聊天倾诉,一路陪伴美好时光"
android:src="@drawable/ic_member_diamond1" /> android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
<com.flyco.roundview.RoundLinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="-18dp"
android:orientation="vertical"
fresco:rv_backgroundColor="#2F2A24"
fresco:rv_cornerRadius_TL="20dp"
fresco:rv_cornerRadius_TR="20dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="25dp" android:layout_marginTop="20dp"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -122,9 +109,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:text="会员专享权益" android:text="会员套餐"
android:textColor="#DDDEDE" android:textColor="@color/white"
android:textSize="16dp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView <ImageView
@@ -137,7 +124,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="22dp" android:layout_marginTop="20dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -155,9 +142,10 @@
android:id="@+id/tv_vip_shift_name1" android:id="@+id/tv_vip_shift_name1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="月度会员" android:text="月"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14dp" android:textSize="14dp"
android:textStyle="bold"
fresco:layout_constraintEnd_toEndOf="parent" fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent" fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent" /> fresco:layout_constraintTop_toTopOf="parent" />
@@ -199,19 +187,10 @@
android:text="¥38" android:text="¥38"
android:textColor="#80FFFFFF" android:textColor="#80FFFFFF"
android:textSize="12dp" android:textSize="12dp"
android:visibility="invisible"
fresco:layout_constraintBottom_toBottomOf="parent" fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent" fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent" /> fresco:layout_constraintStart_toStartOf="parent" />
<ImageView
android:id="@+id/iv_vip_shift1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_member_select"
android:visibility="gone"
fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@@ -225,6 +204,7 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:textStyle="bold"
android:id="@+id/tv_vip_shift_name2" android:id="@+id/tv_vip_shift_name2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -285,14 +265,6 @@
fresco:layout_constraintEnd_toEndOf="parent" fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintTop_toTopOf="parent" /> fresco:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_vip_shift2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_member_select"
android:visibility="gone"
fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@@ -305,6 +277,7 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:textStyle="bold"
android:id="@+id/tv_vip_shift_name3" android:id="@+id/tv_vip_shift_name3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -376,16 +349,33 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/sv_general_member"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="none">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_member_line1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:text="会员权益"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_member_line2" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/general_recycler_view" android:id="@+id/general_recycler_view"
@@ -393,13 +383,68 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp" />
android:layout_marginBottom="100dp" />
<TextView
android:layout_marginTop="20dp"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="更多会员权益敬请期待..."
android:textColor="@color/white"
android:textSize="12sp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_member_line1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:text="注意事项"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_member_line2" />
</LinearLayout>
<RelativeLayout
android:layout_marginBottom="100dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="20dp"
android:background="@drawable/ic_general_member_header_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_notice"
android:layout_margin="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1.请确保在网络良好的情况支付,为保证充值顺利,请在充值期间不要进行其他操作\n\n2.VIP属于虚拟商品一经购买不得退换\n\n3.原充值购买VIP会员的用户将自动升级为SVIP会员\n\n4.原赠送的VIP会员保持不变\n\n5.VIP会员视频折扣-10金币SVIP会员视频折扣-20金币"
android:textColor="@color/white"
android:textSize="12sp"
/>
</RelativeLayout>
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</com.flyco.roundview.RoundLinearLayout>
</LinearLayout>
<!-- </androidx.core.widget.NestedScrollView>-->
<LinearLayout <LinearLayout
android:id="@+id/lin_member_bottom" android:id="@+id/lin_member_bottom"

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fresco="http://schemas.android.com/apk/res-auto" xmlns:fresco="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -7,18 +8,16 @@
tools:viewBindingIgnore="true"> tools:viewBindingIgnore="true">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/sv_super_member" android:id="@+id/sv_general_member"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentTop="true" android:fillViewport="true"
android:layout_marginBottom="40dp"
android:background="@mipmap/ic_member_svip"
android:scrollbars="none"> android:scrollbars="none">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_marginBottom="60dp" android:layout_alignParentTop="true"
android:background="@mipmap/ic_member_svip" android:background="@mipmap/ic_member_svip"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
@@ -26,75 +25,71 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="180dp"
android:layout_marginStart="16dp" android:layout_marginLeft="16dp"
android:layout_marginTop="140dp" android:layout_marginTop="150dp"
android:layout_marginEnd="16dp"> android:layout_marginRight="16dp"
android:background="@drawable/ic_super_member_top_bg">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="22dp" android:layout_marginLeft="16dp"
android:background="@drawable/ic_super_member_top_bg" android:layout_marginTop="16dp"
android:orientation="vertical"> android:layout_marginRight="16dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_vip_tag" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginLeft="6dp"
android:layout_marginTop="32dp" android:layout_weight="1"
android:text="SVIP享专属特权" android:text="特权"
android:textColor="#E2C5FB" android:textColor="@color/white"
android:textSize="18dp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
<RelativeLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:gravity="center_vertical"
android:layout_marginTop="10dp"> android:orientation="horizontal">
<ImageView <com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/member_my_photo1" android:id="@+id/user_head"
android:layout_width="28dp" android:layout_width="16dp"
android:layout_height="28dp" android:layout_height="16dp"
android:src="@drawable/ic_member_photo1" /> android:scaleType="fitXY"
app:roundAsCircle="true"
<ImageView app:roundingBorderColor="@color/white"
android:id="@+id/member_my_photo2" app:roundingBorderWidth="2dp" />
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_marginStart="-8dp"
android:layout_toEndOf="@+id/member_my_photo1"
android:src="@drawable/ic_member_photo2" />
<ImageView
android:id="@+id/member_my_photo3"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_marginStart="-8dp"
android:layout_toEndOf="@+id/member_my_photo2"
android:src="@drawable/ic_member_photo3" />
</RelativeLayout>
<TextView <TextView
android:id="@+id/tv_member_time" android:id="@+id/tv_member_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginLeft="6dp"
android:layout_marginTop="8dp" android:text="你还未开通VIP"
android:layout_marginBottom="14dp" android:textColor="@color/white"
android:text="1000+用户已开通" android:textSize="16sp"
android:textColor="#F8D9F9" android:textStyle="bold" />
android:textSize="12dp" /> </LinearLayout>
</LinearLayout> </LinearLayout>
<ImageView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_centerInParent="true"
android:layout_marginEnd="20dp" android:text="聊天倾诉,一路陪伴美好时光"
android:src="@drawable/ic_member_diamond2" /> android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
@@ -114,9 +109,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:text="SVIP专享权益" android:text="会员套餐"
android:textColor="#DDD6FF" android:textColor="@color/white"
android:textSize="16dp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView <ImageView
@@ -125,6 +120,235 @@
android:src="@drawable/ic_super_member_line2" /> android:src="@drawable/ic_super_member_line2" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/lin_vip_shift1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="7dp"
android:layout_weight="1"
android:background="@drawable/vip_select_bg2"
android:orientation="vertical"
android:paddingTop="16dp">
<TextView
android:id="@+id/tv_vip_shift_name1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="单月"
android:textColor="@color/white"
android:textSize="14dp"
android:textStyle="bold"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:layout_marginBottom="12dp"
android:orientation="horizontal"
fresco:layout_constraintBottom_toTopOf="@+id/tv_vip_price_hint1"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toBottomOf="@+id/tv_vip_shift_name1">
<TextView
android:id="@+id/tv_vip_unit1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textColor="#F9C644"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_vip_price1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="18"
android:textColor="#F9C644"
android:textSize="28dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_vip_price_hint1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="¥38"
android:textColor="#80FFFFFF"
android:textSize="12dp"
fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/lin_vip_shift2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:layout_marginEnd="7dp"
android:layout_weight="1"
android:background="@drawable/vip_select_bg1"
android:orientation="vertical">
<TextView
android:textStyle="bold"
android:id="@+id/tv_vip_shift_name2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="年度会员"
android:textColor="@color/white"
android:textSize="14dp"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:layout_marginBottom="12dp"
android:orientation="horizontal"
fresco:layout_constraintBottom_toTopOf="@+id/tv_vip_price_hint2"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toBottomOf="@+id/tv_vip_shift_name2">
<TextView
android:id="@+id/tv_vip_unit2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textColor="#F9C644"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_vip_price2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="128"
android:textColor="#F9C644"
android:textSize="28dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_vip_price_hint2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="¥228"
android:textColor="#80FFFFFF"
android:textSize="12dp"
fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="新用户立减100"
android:visibility="gone"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/lin_vip_shift3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:layout_weight="1"
android:background="@drawable/vip_select_bg1"
android:orientation="vertical">
<TextView
android:textStyle="bold"
android:id="@+id/tv_vip_shift_name3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="月度会员"
android:textColor="@color/white"
android:textSize="14dp"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:layout_marginBottom="12dp"
android:orientation="horizontal"
fresco:layout_constraintBottom_toTopOf="@+id/tv_vip_price_hint3"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toBottomOf="@+id/tv_vip_shift_name3">
<TextView
android:id="@+id/tv_vip_unit3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textColor="#F9C644"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_vip_price3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="18"
android:textColor="#F9C644"
android:textSize="28dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_vip_price_hint3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="¥38"
android:textColor="#80FFFFFF"
android:textSize="12dp"
fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent" />
<com.flyco.roundview.RoundTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="1dp"
android:paddingEnd="10dp"
android:paddingBottom="1dp"
android:text="热门"
android:textColor="#A05912"
android:textSize="11dp"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent"
fresco:rv_backgroundColor="#FFD89E"
fresco:rv_cornerRadius_BR="12dp"
fresco:rv_cornerRadius_TL="12dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -0,0 +1,508 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:viewBindingIgnore="true">
<androidx.core.widget.NestedScrollView
android:id="@+id/sv_general_member"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:background="@mipmap/ic_member_svip"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="150dp"
android:layout_marginRight="16dp"
android:background="@drawable/ic_super_member_top_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_vip_tag" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_weight="1"
android:text="特权"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/user_head"
android:layout_width="16dp"
android:layout_height="16dp"
android:scaleType="fitXY"
app:roundAsCircle="true"
app:roundingBorderColor="@color/white"
app:roundingBorderWidth="2dp" />
<TextView
android:id="@+id/tv_member_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:text="你还未开通SVIP"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="聊天倾诉,一路陪伴美好时光"
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_super_member_line1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:text="会员套餐"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_super_member_line2" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/lin_vip_shift1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="7dp"
android:layout_weight="1"
android:background="@drawable/vip_select_bg2"
android:orientation="vertical"
android:paddingTop="16dp">
<TextView
android:id="@+id/tv_vip_shift_name1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="单月"
android:textColor="@color/white"
android:textSize="14dp"
android:textStyle="bold"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:layout_marginBottom="12dp"
android:orientation="horizontal"
fresco:layout_constraintBottom_toTopOf="@+id/tv_vip_price_hint1"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toBottomOf="@+id/tv_vip_shift_name1">
<TextView
android:id="@+id/tv_vip_unit1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textColor="#F9C644"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_vip_price1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="18"
android:textColor="#F9C644"
android:textSize="28dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_vip_price_hint1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="¥38"
android:textColor="#80FFFFFF"
android:textSize="12dp"
fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/lin_vip_shift2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:layout_marginEnd="7dp"
android:layout_weight="1"
android:background="@drawable/vip_select_bg1"
android:orientation="vertical">
<TextView
android:textStyle="bold"
android:id="@+id/tv_vip_shift_name2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="年度会员"
android:textColor="@color/white"
android:textSize="14dp"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:layout_marginBottom="12dp"
android:orientation="horizontal"
fresco:layout_constraintBottom_toTopOf="@+id/tv_vip_price_hint2"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toBottomOf="@+id/tv_vip_shift_name2">
<TextView
android:id="@+id/tv_vip_unit2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textColor="#F9C644"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_vip_price2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="128"
android:textColor="#F9C644"
android:textSize="28dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_vip_price_hint2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="¥228"
android:textColor="#80FFFFFF"
android:textSize="12dp"
fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="新用户立减100"
android:visibility="gone"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/lin_vip_shift3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:layout_weight="1"
android:background="@drawable/vip_select_bg1"
android:orientation="vertical">
<TextView
android:textStyle="bold"
android:id="@+id/tv_vip_shift_name3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="月度会员"
android:textColor="@color/white"
android:textSize="14dp"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:layout_marginBottom="12dp"
android:orientation="horizontal"
fresco:layout_constraintBottom_toTopOf="@+id/tv_vip_price_hint3"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toBottomOf="@+id/tv_vip_shift_name3">
<TextView
android:id="@+id/tv_vip_unit3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textColor="#F9C644"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_vip_price3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="18"
android:textColor="#F9C644"
android:textSize="28dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_vip_price_hint3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="¥38"
android:textColor="#80FFFFFF"
android:textSize="12dp"
fresco:layout_constraintBottom_toBottomOf="parent"
fresco:layout_constraintEnd_toEndOf="parent"
fresco:layout_constraintStart_toStartOf="parent" />
<com.flyco.roundview.RoundTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="1dp"
android:paddingEnd="10dp"
android:paddingBottom="1dp"
android:text="热门"
android:textColor="#A05912"
android:textSize="11dp"
fresco:layout_constraintStart_toStartOf="parent"
fresco:layout_constraintTop_toTopOf="parent"
fresco:rv_backgroundColor="#FFD89E"
fresco:rv_cornerRadius_BR="12dp"
fresco:rv_cornerRadius_TL="12dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_super_member_line1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:text="会员权益"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_super_member_line2" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/general_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginTop="16dp"
android:layout_marginRight="10dp" />
<TextView
android:layout_marginTop="20dp"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="更多会员权益敬请期待..."
android:textColor="@color/white"
android:textSize="12sp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_super_member_line1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:text="注意事项"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_super_member_line2" />
</LinearLayout>
<RelativeLayout
android:layout_marginBottom="100dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="20dp"
android:background="@drawable/ic_super_member_top_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_notice"
android:layout_margin="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1.请确保在网络良好的情况支付,为保证充值顺利,请在充值期间不要进行其他操作\n\n2.VIP属于虚拟商品一经购买不得退换\n\n3.原充值购买VIP会员的用户将自动升级为SVIP会员\n\n4.原赠送的VIP会员保持不变\n\n5.VIP会员视频折扣-10金币SVIP会员视频折扣-20金币"
android:textColor="@color/white"
android:textSize="12sp"
/>
</RelativeLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:id="@+id/lin_member_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/transparent"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/tv_member_open"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="30dp"
android:background="@drawable/ic_buy_vip_btn_bg"
android:gravity="center"
android:text="立即开通"
android:textColor="@color/one_text"
android:textSize="16dp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/lin_member_bottom_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="30dp"
android:background="@drawable/ic_vip_bottom_btn_bg"
android:gravity="center"
android:visibility="gone">
<TextView
android:id="@+id/tv_member_setting"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="设置特权"
android:textColor="@color/one_text"
android:textSize="16dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_member_sure"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="继续购买"
android:textColor="@color/one_text"
android:textSize="16dp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -14,12 +14,11 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="102dp"> android:minHeight="102dp">
<ImageView <com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_privilege_img" android:id="@+id/iv_privilege_img"
android:layout_width="wrap_content" android:layout_width="44dp"
android:layout_height="wrap_content" android:layout_height="44dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:src="@drawable/ic_privilege1"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@@ -52,6 +51,7 @@
tools:text="每日免费聊100条" /> tools:text="每日免费聊100条" />
<ImageView <ImageView
android:visibility="gone"
android:id="@+id/iv_privilege_tip" android:id="@+id/iv_privilege_tip"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 KiB

After

Width:  |  Height:  |  Size: 507 KiB