Example #1
0
 private void initItems() {
   initData();
   boolean isCheckedProject = false;
   for (ScanBean bean : scanBeans) {
     View item = getLayoutInflater().inflate(R.layout.about_add_project_item, null);
     TextView aboutProjectNameTV = (TextView) item.findViewById(R.id.aboutProjectNameTV);
     aboutProjectNameTV.setText(bean.getScanName());
     TextView aboutProjectVersionTV = (TextView) item.findViewById(R.id.aboutProjectVersionTV);
     aboutProjectVersionTV.setText(bean.getScanVersion());
     if (!isCheckedProject
         && curScanBean.getScanName().equals(bean.getScanName())
         && curScanBean.getScanVersion().equals(bean.getScanVersion())) {
       aboutProjectNameTV.setTextColor(ColorUtil.getCommonBlueColor(this));
       aboutProjectVersionTV.setTextColor(ColorUtil.getCommonBlueColor(this));
       isCheckedProject = true;
     }
     items.add(item);
   }
 }
Example #2
0
 private void initData() {
   scanBeans = StaticUtil.getScanBeans(this);
   curScanBean = StaticUtil.getCurScanBean(this);
   aboutVersionTV.setText(curScanBean.getScanName() + curScanBean.getScanVersion());
 }