more renames

This commit is contained in:
tibbi 2016-07-04 16:19:28 +02:00
parent 1e3b2ff8d6
commit 77077b7369
2 changed files with 14 additions and 14 deletions

View File

@ -30,20 +30,20 @@ public class DirectoryAdapter extends BaseAdapter {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
ViewHolder viewHolder;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.directory_item, parent, false);
holder = new ViewHolder(convertView);
convertView.setTag(holder);
viewHolder = new ViewHolder(convertView);
convertView.setTag(viewHolder);
} else {
holder = (ViewHolder) convertView.getTag();
viewHolder = (ViewHolder) convertView.getTag();
}
final Directory dir = mDirs.get(position);
holder.dirName.setText(dir.getName());
holder.photoCnt.setText(String.valueOf(dir.getMediaCnt()));
viewHolder.dirName.setText(dir.getName());
viewHolder.photoCnt.setText(String.valueOf(dir.getMediaCnt()));
Glide.with(mContext).load(dir.getThumbnail()).placeholder(R.color.tmb_background).centerCrop().crossFade()
.into(holder.dirThumbnail);
.into(viewHolder.dirThumbnail);
return convertView;
}

View File

@ -30,23 +30,23 @@ public class MediaAdapter extends BaseAdapter {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final Medium medium = mMedia.get(position);
ViewHolder holder;
ViewHolder viewHolder;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.video_item, parent, false);
holder = new ViewHolder(convertView);
convertView.setTag(holder);
viewHolder = new ViewHolder(convertView);
convertView.setTag(viewHolder);
} else {
holder = (ViewHolder) convertView.getTag();
viewHolder = (ViewHolder) convertView.getTag();
}
if (medium.getIsVideo()) {
holder.playOutline.setVisibility(View.VISIBLE);
viewHolder.playOutline.setVisibility(View.VISIBLE);
} else {
holder.playOutline.setVisibility(View.GONE);
viewHolder.playOutline.setVisibility(View.GONE);
}
final String path = medium.getPath();
Glide.with(mContext).load(path).placeholder(R.color.tmb_background).centerCrop().crossFade().into(holder.photoThumbnail);
Glide.with(mContext).load(path).placeholder(R.color.tmb_background).centerCrop().crossFade().into(viewHolder.photoThumbnail);
return convertView;
}