我的修改完成
This commit is contained in:
parent
e0c9b637df
commit
af0cb7babe
@ -569,22 +569,17 @@ public class CommonAppConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setYolatUserItemList(String yola_list) {
|
public void setYolatUserItemList(String yola_list) {
|
||||||
if (yola_list == null || yola_list.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mYolaUserItemList.clear();
|
|
||||||
JSONObject obj = JSON.parseObject(yola_list);
|
JSONObject obj = JSON.parseObject(yola_list);
|
||||||
|
List<List<UserItemBean>> newList = new ArrayList<>();
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
List<UserItemBean> list1 = JSON.parseArray(obj.getString("user_rights"), UserItemBean.class);
|
List<UserItemBean> list1 = JSON.parseArray(obj.getString("user_rights"), UserItemBean.class);
|
||||||
|
newList.add(list1);
|
||||||
List<UserItemBean> list2 = JSON.parseArray(obj.getString("creation_center"), UserItemBean.class);
|
List<UserItemBean> list2 = JSON.parseArray(obj.getString("creation_center"), UserItemBean.class);
|
||||||
|
newList.add(list2);
|
||||||
List<UserItemBean> list3 = JSON.parseArray(obj.getString("other_functions"), UserItemBean.class);
|
List<UserItemBean> list3 = JSON.parseArray(obj.getString("other_functions"), UserItemBean.class);
|
||||||
|
newList.add(list3);
|
||||||
mYolaUserItemList.add(list1);
|
|
||||||
mYolaUserItemList.add(list2);
|
|
||||||
mYolaUserItemList.add(list3);
|
|
||||||
}
|
}
|
||||||
|
mYolaUserItemList = newList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,6 +166,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
|||||||
// img_lv_pic = (ImageView) findViewById(R.id.img_lv_pic);
|
// img_lv_pic = (ImageView) findViewById(R.id.img_lv_pic);
|
||||||
// tv_setting = (TextView) findViewById(R.id.tv_setting);
|
// tv_setting = (TextView) findViewById(R.id.tv_setting);
|
||||||
findViewById(R.id.goldCoinImg).setOnClickListener(this);
|
findViewById(R.id.goldCoinImg).setOnClickListener(this);
|
||||||
|
findViewById(R.id.rechargeImg).setOnClickListener(this);
|
||||||
|
findViewById(R.id.rechargeTv).setOnClickListener(this);
|
||||||
|
|
||||||
findViewById(R.id.diamondImg).setOnClickListener(this);
|
findViewById(R.id.diamondImg).setOnClickListener(this);
|
||||||
findViewById(R.id.goldenBeanImg).setOnClickListener(this);
|
findViewById(R.id.goldenBeanImg).setOnClickListener(this);
|
||||||
|
|
||||||
@ -462,7 +465,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
|||||||
|
|
||||||
List<UserItemBean> otherList= list.get(2);
|
List<UserItemBean> otherList= list.get(2);
|
||||||
List<UserItemBean> listNow2 = new ArrayList<>();
|
List<UserItemBean> listNow2 = new ArrayList<>();
|
||||||
for (UserItemBean userItemBean : createList) {
|
for (UserItemBean userItemBean : otherList) {
|
||||||
if (userItemBean.getId() != 21 && userItemBean.getId() != 13) {
|
if (userItemBean.getId() != 21 && userItemBean.getId() != 13) {
|
||||||
listNow2.add(userItemBean);
|
listNow2.add(userItemBean);
|
||||||
} else if (userItemBean.getId() == 21) {
|
} else if (userItemBean.getId() == 21) {
|
||||||
@ -575,13 +578,12 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
||||||
int i = v.getId();
|
int i = v.getId();
|
||||||
if (i == R.id.name ||i==R.id.btn_edit) {
|
if (i == R.id.name ||i==R.id.btn_edit) {
|
||||||
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
||||||
} else if (i == R.id.signature) {
|
} else if (i == R.id.signature) {
|
||||||
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
||||||
} else if (i == R.id.goldCoinImg) {
|
} else if (i == R.id.goldCoinImg||i==R.id.rechargeImg||i==R.id.rechargeTv) {
|
||||||
Map<String, String> map_ekv = new HashMap<String, String>();
|
Map<String, String> map_ekv = new HashMap<String, String>();
|
||||||
map_ekv.put("from", "xb");
|
map_ekv.put("from", "xb");
|
||||||
MobclickAgent.onEvent(mContext, "my_recharge", map_ekv);
|
MobclickAgent.onEvent(mContext, "my_recharge", map_ekv);
|
||||||
|
Loading…
Reference in New Issue
Block a user