diff --git a/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/edit/WorkListViewAdapter.java b/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/edit/WorkListViewAdapter.java index 019a238..e8c7497 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/edit/WorkListViewAdapter.java +++ b/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/edit/WorkListViewAdapter.java @@ -16,11 +16,11 @@ private final LayoutInflater inflater; private final int layoutId; - private ArrayList animationName; - private ArrayList lastUpdate; + private ArrayList animationNameList; + private ArrayList lastUpdateList; //参照保存データ - static class ViewHolder{ + static class ViewHolder { TextView textViewName; TextView textViewDate; } @@ -36,15 +36,15 @@ super(); this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); this.layoutId = layoutId; - this.animationName = animationName; - this.lastUpdate = lastUpdate; + this.animationNameList = animationName; + this.lastUpdateList = lastUpdate; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewHolder; //Viewのinflate(拡張) - if (convertView == null){ + if (convertView == null) { //fragment_edit.xmlにlistView用のレイアウトを入れ込む convertView = inflater.inflate(layoutId, parent, false); //ViewHolderの生成とレイアウト内テキストのセット @@ -52,29 +52,29 @@ viewHolder.textViewName = convertView.findViewById(R.id.textViewName); viewHolder.textViewDate = convertView.findViewById(R.id.textViewDate); convertView.setTag(viewHolder); - }else { + } else { //既に初期セットの処理がされている場合、再利用する viewHolder = (ViewHolder) convertView.getTag(); } //ViewHolder内のtextViewName,Dateに各ポジションのデータをセット - if (animationName != null) viewHolder.textViewName.setText(animationName.get(position)); - if (lastUpdate != null) viewHolder.textViewDate.setText(lastUpdate.get(position)); + if (animationNameList != null) viewHolder.textViewName.setText(animationNameList.get(position)); + if (lastUpdateList != null) viewHolder.textViewDate.setText(lastUpdateList.get(position)); return convertView; } - public void setAnimationName(ArrayList animationName) { - this.animationName = animationName; + public void setAnimationNameList(ArrayList animationNameList) { + this.animationNameList = animationNameList; } - public void setLastUpdate(ArrayList lastUpdate) { - this.lastUpdate = lastUpdate; + public void setLastUpdateList(ArrayList lastUpdateList) { + this.lastUpdateList = lastUpdateList; } @Override public int getCount() { - return animationName.size(); + return animationNameList.size(); } @Override