|
@@ -601,29 +601,30 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
|
|
|
- BtnInfoBean btnInfoBean= JsonUtil.jsonString2Bean(view.getTag().toString(), BtnInfoBean.class);
|
|
|
+ String tagVal = view.getTag().toString();
|
|
|
+ BtnInfoBean itemBean= JsonUtil.jsonString2Bean(tagVal, BtnInfoBean.class);
|
|
|
|
|
|
|
|
|
LinearLayout llBtnModule = (LinearLayout)view.getParent();
|
|
|
for (int j = 0; j < llBtnModule.getChildCount(); j++) {
|
|
|
View child = llBtnModule.getChildAt(j);
|
|
|
- if (child != null && child.getTag()!=null){
|
|
|
+ String tmpTag = (String) child.getTag();
|
|
|
+ if (!tagVal.equals(tmpTag)){
|
|
|
child.setBackgroundResource(R.drawable.text_border);
|
|
|
BtnInfoBean tmp = JsonUtil.jsonString2Bean(child.getTag().toString(), BtnInfoBean.class);
|
|
|
tmp.setChecked(false);
|
|
|
child.setTag((new Gson()).toJson(tmp));
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (btnInfoBean.getChecked()){
|
|
|
+ if (itemBean.getChecked()){
|
|
|
view.setBackgroundResource(R.drawable.text_border_select);
|
|
|
}else{
|
|
|
view.setBackgroundResource(R.drawable.text_border);
|
|
|
}
|
|
|
- btnInfoBean.setChecked(!btnInfoBean.getChecked());
|
|
|
- view.setTag((new Gson()).toJson(btnInfoBean));
|
|
|
+ itemBean.setChecked(!itemBean.getChecked());
|
|
|
+ view.setTag((new Gson()).toJson(itemBean));
|
|
|
|
|
|
|
|
|
|
|
@@ -633,8 +634,8 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
|
|
|
LinearLayout llUploadView = itemRoot.findViewById(R.id.ll_upload_view);
|
|
|
|
|
|
|
|
|
- List<NeedPhotoBean> needPhotoBeanList = btnInfoBean.getNeedPhotos();
|
|
|
- String attrId = btnInfoBean.getValue();
|
|
|
+ List<NeedPhotoBean> needPhotoBeanList = itemBean.getNeedPhotos();
|
|
|
+ String attrId = itemBean.getValue();
|
|
|
XLog.e("点击按钮");
|
|
|
|
|
|
|