rename a couple variables
This commit is contained in:
parent
bb71618d54
commit
1e3b2ff8d6
3 changed files with 22 additions and 22 deletions
|
@ -23,20 +23,20 @@ public class DirectoryAdapter extends BaseAdapter {
|
||||||
private final LayoutInflater mInflater;
|
private final LayoutInflater mInflater;
|
||||||
|
|
||||||
public DirectoryAdapter(Context context, List<Directory> dirs) {
|
public DirectoryAdapter(Context context, List<Directory> dirs) {
|
||||||
this.mContext = context;
|
mContext = context;
|
||||||
this.mDirs = dirs;
|
mDirs = dirs;
|
||||||
this.mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View getView(int position, View view, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
ViewHolder holder;
|
ViewHolder holder;
|
||||||
if (view == null) {
|
if (convertView == null) {
|
||||||
view = mInflater.inflate(R.layout.directory_item, parent, false);
|
convertView = mInflater.inflate(R.layout.directory_item, parent, false);
|
||||||
holder = new ViewHolder(view);
|
holder = new ViewHolder(convertView);
|
||||||
view.setTag(holder);
|
convertView.setTag(holder);
|
||||||
} else {
|
} else {
|
||||||
holder = (ViewHolder) view.getTag();
|
holder = (ViewHolder) convertView.getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
final Directory dir = mDirs.get(position);
|
final Directory dir = mDirs.get(position);
|
||||||
|
@ -45,7 +45,7 @@ public class DirectoryAdapter extends BaseAdapter {
|
||||||
Glide.with(mContext).load(dir.getThumbnail()).placeholder(R.color.tmb_background).centerCrop().crossFade()
|
Glide.with(mContext).load(dir.getThumbnail()).placeholder(R.color.tmb_background).centerCrop().crossFade()
|
||||||
.into(holder.dirThumbnail);
|
.into(holder.dirThumbnail);
|
||||||
|
|
||||||
return view;
|
return convertView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -22,21 +22,21 @@ public class MediaAdapter extends BaseAdapter {
|
||||||
private final LayoutInflater mInflater;
|
private final LayoutInflater mInflater;
|
||||||
|
|
||||||
public MediaAdapter(Context context, List<Medium> media) {
|
public MediaAdapter(Context context, List<Medium> media) {
|
||||||
this.mContext = context;
|
mContext = context;
|
||||||
this.mMedia = media;
|
mMedia = media;
|
||||||
this.mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View getView(int position, View view, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
final Medium medium = mMedia.get(position);
|
final Medium medium = mMedia.get(position);
|
||||||
ViewHolder holder;
|
ViewHolder holder;
|
||||||
if (view == null) {
|
if (convertView == null) {
|
||||||
view = mInflater.inflate(R.layout.video_item, parent, false);
|
convertView = mInflater.inflate(R.layout.video_item, parent, false);
|
||||||
holder = new ViewHolder(view);
|
holder = new ViewHolder(convertView);
|
||||||
view.setTag(holder);
|
convertView.setTag(holder);
|
||||||
} else {
|
} else {
|
||||||
holder = (ViewHolder) view.getTag();
|
holder = (ViewHolder) convertView.getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (medium.getIsVideo()) {
|
if (medium.getIsVideo()) {
|
||||||
|
@ -48,7 +48,7 @@ public class MediaAdapter extends BaseAdapter {
|
||||||
final String path = medium.getPath();
|
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(holder.photoThumbnail);
|
||||||
|
|
||||||
return view;
|
return convertView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -23,8 +23,8 @@ public class MyPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
public MyPagerAdapter(ViewPagerActivity act, FragmentManager fm, List<Medium> media) {
|
public MyPagerAdapter(ViewPagerActivity act, FragmentManager fm, List<Medium> media) {
|
||||||
super(fm);
|
super(fm);
|
||||||
this.mActivity = act;
|
mActivity = act;
|
||||||
this.mMedia = media;
|
mMedia = media;
|
||||||
mFragments = new HashMap<>();
|
mFragments = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue