Commit 10cbb0094a38efce60e1628cc68ffeaf6d0a2668
1 parent
ab663b2d
1 完成设置角色逻辑
Showing
2 changed files
with
3 additions
and
6 deletions
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/presenter/SetFriendsRolePresenter.java
| ... | ... | @@ -47,11 +47,6 @@ public class SetFriendsRolePresenter extends MvpBasePresenter<SetFriendsRoleView |
| 47 | 47 | if (null == getView()) { |
| 48 | 48 | return; |
| 49 | 49 | } |
| 50 | - for (int i=0;i<baseInfo.getData().getRoleList().size();i++){ | |
| 51 | - if (baseInfo.getData().getRoleList().get(i).getRoleName().equals("哥哥")){ | |
| 52 | - baseInfo.getData().getRoleList().get(i).setAllowUse(false); | |
| 53 | - } | |
| 54 | - } | |
| 55 | 50 | getView().initView(baseInfo.getData()); |
| 56 | 51 | |
| 57 | 52 | } | ... | ... |
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/ui/adapter/AllRoleDetailAdapter.java
| ... | ... | @@ -4,6 +4,7 @@ import android.content.Context; |
| 4 | 4 | import android.databinding.DataBindingUtil; |
| 5 | 5 | import android.support.annotation.NonNull; |
| 6 | 6 | import android.support.v7.widget.RecyclerView; |
| 7 | +import android.text.TextUtils; | |
| 7 | 8 | import android.util.Log; |
| 8 | 9 | import android.view.LayoutInflater; |
| 9 | 10 | import android.view.View; |
| ... | ... | @@ -54,7 +55,7 @@ public class AllRoleDetailAdapter extends RecyclerView.Adapter { |
| 54 | 55 | if (null == selectId) { |
| 55 | 56 | selectId = ""; |
| 56 | 57 | } |
| 57 | - if (selectId.contains(allRoleList.get(position).getId() + "")) { | |
| 58 | + if (selectId.equals(allRoleList.get(position).getId() + "")) { | |
| 58 | 59 | binding.checkBox.setChecked(true); |
| 59 | 60 | } else { |
| 60 | 61 | binding.checkBox.setChecked(false); |
| ... | ... | @@ -93,6 +94,7 @@ public class AllRoleDetailAdapter extends RecyclerView.Adapter { |
| 93 | 94 | if (view.getId() == R.id.ll_root) { |
| 94 | 95 | int position = getAdapterPosition(); |
| 95 | 96 | String selectId = setRoleAdapter.getRoleInfoList().get(allRoleList.get(position).getParentPosition()).getSelectId(); |
| 97 | + Log.e(TAG, "onClick: " + selectId); | |
| 96 | 98 | if (null == selectId) { |
| 97 | 99 | selectId = ""; |
| 98 | 100 | } | ... | ... |