|
@@ -7,7 +7,6 @@ import android.graphics.Color;
|
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
|
import android.os.Handler;
|
|
import android.os.Handler;
|
|
|
import android.os.Message;
|
|
import android.os.Message;
|
|
|
-import android.support.v7.widget.GridLayoutManager;
|
|
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
@@ -28,7 +27,6 @@ import com.sheep.gamegroup.util.*;
|
|
|
import com.sheep.gamegroup.util.share.ShareLinkConfig;
|
|
import com.sheep.gamegroup.util.share.ShareLinkConfig;
|
|
|
import com.sheep.gamegroup.view.activity.PersonalCenterAct;
|
|
import com.sheep.gamegroup.view.activity.PersonalCenterAct;
|
|
|
import com.sheep.gamegroup.view.activity.ReNameActivity;
|
|
import com.sheep.gamegroup.view.activity.ReNameActivity;
|
|
|
-import com.sheep.gamegroup.view.customview.RecyclerItemDecoration;
|
|
|
|
|
import com.sheep.jiuyan.samllsheep.Config;
|
|
import com.sheep.jiuyan.samllsheep.Config;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
@@ -36,7 +34,6 @@ import com.sheep.jiuyan.samllsheep.base.BaseFragment;
|
|
|
import com.sheep.jiuyan.samllsheep.bean.UserCenterModule;
|
|
import com.sheep.jiuyan.samllsheep.bean.UserCenterModule;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
-import com.uuzuche.lib_zxing.DisplayUtil;
|
|
|
|
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
|
|
import io.reactivex.schedulers.Schedulers;
|
|
import io.reactivex.schedulers.Schedulers;
|
|
|
import org.afinal.simplecache.ACache;
|
|
import org.afinal.simplecache.ACache;
|
|
@@ -80,10 +77,6 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
View pc_mm_red_dot_v;
|
|
View pc_mm_red_dot_v;
|
|
|
@BindView(R.id.personalcenter_item_price_tv)
|
|
@BindView(R.id.personalcenter_item_price_tv)
|
|
|
TextView personalcenter_item_price_tv;
|
|
TextView personalcenter_item_price_tv;
|
|
|
- @BindView(R.id.proxy_service_layout)
|
|
|
|
|
- View proxy_service_layout;
|
|
|
|
|
- @BindView(R.id.proxy_service_layout_line)
|
|
|
|
|
- View proxy_service_layout_line;
|
|
|
|
|
@BindView(R.id.version_item_tv)
|
|
@BindView(R.id.version_item_tv)
|
|
|
TextView version_item_tv;
|
|
TextView version_item_tv;
|
|
|
@BindView(R.id.personal_center_version_new)
|
|
@BindView(R.id.personal_center_version_new)
|
|
@@ -110,14 +103,6 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
LinearLayout moduleLayout;
|
|
LinearLayout moduleLayout;
|
|
|
@BindView(R.id.my_module_list)
|
|
@BindView(R.id.my_module_list)
|
|
|
RecyclerView moduleList;
|
|
RecyclerView moduleList;
|
|
|
- @BindView(R.id.fgt_person_center_my_focus_line)
|
|
|
|
|
- View fgt_person_center_my_focus_line;
|
|
|
|
|
- @BindView(R.id.fgt_person_center_my_focus)
|
|
|
|
|
- View fgt_person_center_my_focus;
|
|
|
|
|
- @BindView(R.id.fgt_pc_item_vip_v)
|
|
|
|
|
- View fgt_pc_item_vip_v;
|
|
|
|
|
- @BindView(R.id.fgt_pc_item_vip_ll)
|
|
|
|
|
- View fgt_pc_item_vip_ll;
|
|
|
|
|
@BindView(R.id.vip_flag_view)
|
|
@BindView(R.id.vip_flag_view)
|
|
|
ImageView vipFlagView;
|
|
ImageView vipFlagView;
|
|
|
@BindView(R.id.tip_vip)
|
|
@BindView(R.id.tip_vip)
|
|
@@ -126,24 +111,12 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
TextView beVipBtn;
|
|
TextView beVipBtn;
|
|
|
@BindView(R.id.voucher_red_dot)
|
|
@BindView(R.id.voucher_red_dot)
|
|
|
View voucher_red_dot;
|
|
View voucher_red_dot;
|
|
|
- @BindView(R.id.fgt_pc_item_my_pet_v)
|
|
|
|
|
- View fgt_pc_item_my_pet_v;
|
|
|
|
|
- @BindView(R.id.fgt_pc_item_my_game_v)
|
|
|
|
|
- View fgt_pc_item_my_game_v;
|
|
|
|
|
- @BindView(R.id.my_pet_layout)
|
|
|
|
|
- View my_pet_layout;
|
|
|
|
|
@BindView(R.id.my_game_layout)
|
|
@BindView(R.id.my_game_layout)
|
|
|
View my_game_layout;
|
|
View my_game_layout;
|
|
|
- @BindView(R.id.fgt_pc_item_my_card_v)
|
|
|
|
|
- View fgt_pc_item_my_card_v;
|
|
|
|
|
@BindView(R.id.my_card_layout)
|
|
@BindView(R.id.my_card_layout)
|
|
|
View my_card_layout;
|
|
View my_card_layout;
|
|
|
@BindView(R.id.login_name_tv)
|
|
@BindView(R.id.login_name_tv)
|
|
|
TextView loginNameTv;
|
|
TextView loginNameTv;
|
|
|
- @BindView(R.id.shop_assist_layout)
|
|
|
|
|
- View shop_assist_layout;
|
|
|
|
|
- @BindView(R.id.fgt_pc_item_shop_assist_v)
|
|
|
|
|
- View fgt_pc_item_shop_assist_v;
|
|
|
|
|
|
|
|
|
|
public UserEntity userEntity;
|
|
public UserEntity userEntity;
|
|
|
private String faqUrl;
|
|
private String faqUrl;
|
|
@@ -216,8 +189,8 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
ViewUtil.setText(audit_failed, getString(R.string.audit_failed, ViewUtil.INDENT));
|
|
ViewUtil.setText(audit_failed, getString(R.string.audit_failed, ViewUtil.INDENT));
|
|
|
ViewUtil.setVisibilityBlock(audit_failed_oval, false);
|
|
ViewUtil.setVisibilityBlock(audit_failed_oval, false);
|
|
|
//是否显示我的关注
|
|
//是否显示我的关注
|
|
|
- ViewUtil.setVisibility(fgt_person_center_my_focus_line, !TestUtil.isLTVersion3_4_5());
|
|
|
|
|
- ViewUtil.setVisibility(fgt_person_center_my_focus, !TestUtil.isLTVersion3_4_5());
|
|
|
|
|
|
|
+ //ViewUtil.setVisibility(fgt_person_center_my_focus_line, !TestUtil.isLTVersion3_4_5());
|
|
|
|
|
+ //ViewUtil.setVisibility(fgt_person_center_my_focus, !TestUtil.isLTVersion3_4_5());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void initData() {
|
|
private void initData() {
|
|
@@ -273,7 +246,7 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
initUserModuleItem();
|
|
initUserModuleItem();
|
|
|
initMyPetState();
|
|
initMyPetState();
|
|
|
ViewUtil.setVisibility(my_card_layout, true);
|
|
ViewUtil.setVisibility(my_card_layout, true);
|
|
|
- ViewUtil.setVisibility(fgt_pc_item_my_card_v, true);
|
|
|
|
|
|
|
+ //ViewUtil.setVisibility(fgt_pc_item_my_card_v, true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void initMyPetState() {
|
|
private void initMyPetState() {
|
|
@@ -285,14 +258,14 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
Mission result = baseMessage.getData(Mission.class);
|
|
Mission result = baseMessage.getData(Mission.class);
|
|
|
boolean hasPet = result != null && result.getId() > 0;
|
|
boolean hasPet = result != null && result.getId() > 0;
|
|
|
- ViewUtil.setVisibility(my_pet_layout, hasPet);
|
|
|
|
|
- ViewUtil.setVisibility(fgt_pc_item_my_pet_v, hasPet);
|
|
|
|
|
|
|
+ //ViewUtil.setVisibility(my_pet_layout, hasPet);
|
|
|
|
|
+ //ViewUtil.setVisibility(fgt_pc_item_my_pet_v, hasPet);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
- ViewUtil.setVisibility(my_pet_layout, false);
|
|
|
|
|
- ViewUtil.setVisibility(fgt_pc_item_my_pet_v, false);
|
|
|
|
|
|
|
+ //ViewUtil.setVisibility(my_pet_layout, false);
|
|
|
|
|
+ //ViewUtil.setVisibility(fgt_pc_item_my_pet_v, false);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -307,7 +280,7 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
moduleList.setHasFixedSize(true);
|
|
moduleList.setHasFixedSize(true);
|
|
|
moduleList.setNestedScrollingEnabled(false);
|
|
moduleList.setNestedScrollingEnabled(false);
|
|
|
moduleList.setLayoutManager(manager);
|
|
moduleList.setLayoutManager(manager);
|
|
|
- if (itemCount > 5) itemCount = 5;
|
|
|
|
|
|
|
+ if (itemCount > 4) itemCount = 4;
|
|
|
int w = (ScreenUtil.getScreenWidth(getActivity()) / itemCount);
|
|
int w = (ScreenUtil.getScreenWidth(getActivity()) / itemCount);
|
|
|
AdpHomeList<UserCenterModule> adapter = new AdpHomeList<>(R.layout.item_my_list_but3, w, userCenterModuleList);
|
|
AdpHomeList<UserCenterModule> adapter = new AdpHomeList<>(R.layout.item_my_list_but3, w, userCenterModuleList);
|
|
|
adapter.bindToRecyclerView(moduleList);
|
|
adapter.bindToRecyclerView(moduleList);
|
|
@@ -325,7 +298,6 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
if (!ListUtil.isEmpty(newList)) {
|
|
if (!ListUtil.isEmpty(newList)) {
|
|
|
userCenterModuleList.clear();
|
|
userCenterModuleList.clear();
|
|
|
userCenterModuleList.addAll(newList);
|
|
userCenterModuleList.addAll(newList);
|
|
|
- userCenterModuleList.addAll(newList);
|
|
|
|
|
initUserModuleItemView(userCenterModuleList.size());
|
|
initUserModuleItemView(userCenterModuleList.size());
|
|
|
ViewUtil.notifyDataSetChanged(moduleList);
|
|
ViewUtil.notifyDataSetChanged(moduleList);
|
|
|
ViewUtil.setVisibility(moduleLayout, true);
|
|
ViewUtil.setVisibility(moduleLayout, true);
|
|
@@ -372,8 +344,8 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void initWidget() {
|
|
private void initWidget() {
|
|
|
- ViewUtil.setVisibility(shop_assist_layout, userEntity.isShopAssist());
|
|
|
|
|
- ViewUtil.setVisibility(fgt_pc_item_shop_assist_v, userEntity.isShopAssist());
|
|
|
|
|
|
|
+ //ViewUtil.setVisibility(shop_assist_layout, userEntity.isShopAssist());
|
|
|
|
|
+ //ViewUtil.setVisibility(fgt_pc_item_shop_assist_v, userEntity.isShopAssist());
|
|
|
ViewUtil.setText(personalcenter_item_price_tv, String.format(Locale.CHINA, "%s\u0020元", NumberFormatUtils.retainMost2W(userEntity.getBalance())));
|
|
ViewUtil.setText(personalcenter_item_price_tv, String.format(Locale.CHINA, "%s\u0020元", NumberFormatUtils.retainMost2W(userEntity.getBalance())));
|
|
|
ViewUtil.setText(nameTv, userEntity.getNickname());
|
|
ViewUtil.setText(nameTv, userEntity.getNickname());
|
|
|
ViewUtil.setText(sheepNumTv, String.format(Locale.CHINA, "绵羊号:%s", userEntity.getInvitation_code()));
|
|
ViewUtil.setText(sheepNumTv, String.format(Locale.CHINA, "绵羊号:%s", userEntity.getInvitation_code()));
|
|
@@ -500,22 +472,20 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
|
|
|
|
|
@OnClick({R.id.icon_img_iv, R.id.account_detail_layout, R.id.personalcenter_item_price_ic,
|
|
@OnClick({R.id.icon_img_iv, R.id.account_detail_layout, R.id.personalcenter_item_price_ic,
|
|
|
R.id.personalcenter_item_price_tag, R.id.personalcenter_item_price_tv,
|
|
R.id.personalcenter_item_price_tag, R.id.personalcenter_item_price_tv,
|
|
|
- R.id.account_task_layout, R.id.proxy_service_layout, R.id.feedbook_layout,
|
|
|
|
|
- R.id.recommend_friend_layout, R.id.faq_layout, R.id.fgt_pc_item_gift_ll,
|
|
|
|
|
- R.id.version_layout, R.id.order_layout, R.id.proxy_game_account_layout,
|
|
|
|
|
- R.id.audit_activity_cl, R.id.audit_success_cl, R.id.audit_failed_cl, R.id.fgt_person_center_cart,
|
|
|
|
|
- R.id.iv_redpackage, R.id.fgt_person_center_my_focus, R.id.fgt_pc_item_vip_ll,
|
|
|
|
|
- R.id.voucher_layout, R.id.my_pet_layout, R.id.my_card_layout, R.id.vip_layout,
|
|
|
|
|
- R.id.login_name_tv, R.id.edit_nickname_view, R.id.my_game_layout, R.id.shop_assist_layout
|
|
|
|
|
|
|
+ R.id.feedbook_layout, R.id.recommend_friend_layout, R.id.faq_layout, R.id.fgt_pc_item_gift_ll,
|
|
|
|
|
+ R.id.version_layout, R.id.order_layout, R.id.audit_activity_cl, R.id.audit_success_cl,
|
|
|
|
|
+ R.id.audit_failed_cl, R.id.fgt_person_center_cart, R.id.iv_redpackage, R.id.voucher_layout,
|
|
|
|
|
+ R.id.my_card_layout, R.id.vip_layout, R.id.login_name_tv,
|
|
|
|
|
+ R.id.my_game_layout,R.id.fgt_person_center_my_focus
|
|
|
})
|
|
})
|
|
|
public void onViewClicked(View view) {
|
|
public void onViewClicked(View view) {
|
|
|
switch (view.getId()) {
|
|
switch (view.getId()) {
|
|
|
- case R.id.edit_nickname_view://审核中心
|
|
|
|
|
|
|
+ /*case R.id.edit_nickname_view://个人信息
|
|
|
Intent i = new Intent(getActivity(), ReNameActivity.class);
|
|
Intent i = new Intent(getActivity(), ReNameActivity.class);
|
|
|
i.putExtra("name", userEntity.getNickname());
|
|
i.putExtra("name", userEntity.getNickname());
|
|
|
startActivity(i);
|
|
startActivity(i);
|
|
|
USER_INFO_NAME.onEvent();
|
|
USER_INFO_NAME.onEvent();
|
|
|
- break;
|
|
|
|
|
|
|
+ break;*/
|
|
|
case R.id.audit_activity_cl://审核中心
|
|
case R.id.audit_activity_cl://审核中心
|
|
|
Jump2View.getInstance().goAuditTastList(activity, FgtMainAudit.POSITION_ACTIVITY);
|
|
Jump2View.getInstance().goAuditTastList(activity, FgtMainAudit.POSITION_ACTIVITY);
|
|
|
break;
|
|
break;
|
|
@@ -537,16 +507,16 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
case R.id.account_detail_layout://个人资料
|
|
case R.id.account_detail_layout://个人资料
|
|
|
Jump2View.getInstance().goPersionInfo(activity, null);
|
|
Jump2View.getInstance().goPersionInfo(activity, null);
|
|
|
break;
|
|
break;
|
|
|
- case R.id.my_pet_layout://我的宠物
|
|
|
|
|
|
|
+ /*case R.id.my_pet_layout://我的宠物
|
|
|
// Jump2View.getInstance().goWeb(activity, Config.getUrlByPath(Config.PATH_MY_PET), "我的宠物");
|
|
// Jump2View.getInstance().goWeb(activity, Config.getUrlByPath(Config.PATH_MY_PET), "我的宠物");
|
|
|
- break;
|
|
|
|
|
|
|
+ break;*/
|
|
|
case R.id.my_game_layout://我的游戏
|
|
case R.id.my_game_layout://我的游戏
|
|
|
Jump2View.getInstance().goWeb(activity, Config.getUrlByPath(Config.PATH_GAME_SHOP_MY_GAME), "我的游戏");
|
|
Jump2View.getInstance().goWeb(activity, Config.getUrlByPath(Config.PATH_GAME_SHOP_MY_GAME), "我的游戏");
|
|
|
break;
|
|
break;
|
|
|
case R.id.my_card_layout://我的卡包
|
|
case R.id.my_card_layout://我的卡包
|
|
|
Jump2View.getInstance().goWeb(activity, Config.getUrlByPath(Config.PATH_MY_CARD), "我的卡包");
|
|
Jump2View.getInstance().goWeb(activity, Config.getUrlByPath(Config.PATH_MY_CARD), "我的卡包");
|
|
|
break;
|
|
break;
|
|
|
- case R.id.fgt_pc_item_vip_ll://VIP
|
|
|
|
|
|
|
+ //case R.id.fgt_pc_item_vip_ll://VIP
|
|
|
case R.id.vip_layout://VIP
|
|
case R.id.vip_layout://VIP
|
|
|
Jump2View.getInstance().gotoVip(activity);
|
|
Jump2View.getInstance().gotoVip(activity);
|
|
|
break;
|
|
break;
|
|
@@ -555,7 +525,7 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
case R.id.personalcenter_item_price_tv://我的资产
|
|
case R.id.personalcenter_item_price_tv://我的资产
|
|
|
Jump2View.getInstance().goMyMoney(activity, null);
|
|
Jump2View.getInstance().goMyMoney(activity, null);
|
|
|
break;
|
|
break;
|
|
|
- case R.id.account_task_layout://任务记录
|
|
|
|
|
|
|
+/* case R.id.account_task_layout://任务记录
|
|
|
Jump2View.getInstance().goAuditTastList(activity, null);
|
|
Jump2View.getInstance().goAuditTastList(activity, null);
|
|
|
break;
|
|
break;
|
|
|
case R.id.proxy_service_layout://代理
|
|
case R.id.proxy_service_layout://代理
|
|
@@ -567,7 +537,7 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
G.showToast(R.string.loading_data);
|
|
G.showToast(R.string.loading_data);
|
|
|
});
|
|
});
|
|
|
USER_AGENT.onEvent();
|
|
USER_AGENT.onEvent();
|
|
|
- break;
|
|
|
|
|
|
|
+ break;*/
|
|
|
case R.id.faq_layout://FAQ帮助
|
|
case R.id.faq_layout://FAQ帮助
|
|
|
CommonUtil.getInstance().getConfigValue("faqurl", (url) -> {
|
|
CommonUtil.getInstance().getConfigValue("faqurl", (url) -> {
|
|
|
faqUrl = url;
|
|
faqUrl = url;
|
|
@@ -594,9 +564,9 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
case R.id.order_layout://订单管理
|
|
case R.id.order_layout://订单管理
|
|
|
Jump2View.getInstance().goGameTaskOrderList(activity);
|
|
Jump2View.getInstance().goGameTaskOrderList(activity);
|
|
|
break;
|
|
break;
|
|
|
- case R.id.proxy_game_account_layout://游戏账号
|
|
|
|
|
|
|
+ /*case R.id.proxy_game_account_layout://游戏账号
|
|
|
Jump2View.getInstance().goGameAccount(activity, null);
|
|
Jump2View.getInstance().goGameAccount(activity, null);
|
|
|
- break;
|
|
|
|
|
|
|
+ break;*/
|
|
|
case R.id.fgt_person_center_my_focus://我的关注
|
|
case R.id.fgt_person_center_my_focus://我的关注
|
|
|
Jump2View.getInstance().goActMyFocus();
|
|
Jump2View.getInstance().goActMyFocus();
|
|
|
break;
|
|
break;
|
|
@@ -615,9 +585,9 @@ public class FgtPersonalCenter extends BaseFragment {
|
|
|
G.shortToast("设置登录密码后不可修改登录名");
|
|
G.shortToast("设置登录密码后不可修改登录名");
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
- case R.id.shop_assist_layout:
|
|
|
|
|
|
|
+ /*case R.id.shop_assist_layout:
|
|
|
Jump2View.getInstance().gotoYYShopAssist(getContext());
|
|
Jump2View.getInstance().gotoYYShopAssist(getContext());
|
|
|
- break;
|
|
|
|
|
|
|
+ break;*/
|
|
|
case R.id.fgt_pc_item_gift_ll:
|
|
case R.id.fgt_pc_item_gift_ll:
|
|
|
Jump2View.getInstance().goMyWelfare(getActivity(), true);
|
|
Jump2View.getInstance().goMyWelfare(getActivity(), true);
|
|
|
break;
|
|
break;
|