diff --git a/app/src/main/java/com/simplemobiletools/gallery/adapters/DirectoryAdapter.java b/app/src/main/java/com/simplemobiletools/gallery/adapters/DirectoryAdapter.java index 8594a3bcf..cef761a6c 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/adapters/DirectoryAdapter.java +++ b/app/src/main/java/com/simplemobiletools/gallery/adapters/DirectoryAdapter.java @@ -23,20 +23,20 @@ public class DirectoryAdapter extends BaseAdapter { private final LayoutInflater mInflater; public DirectoryAdapter(Context context, List dirs) { - this.mContext = context; - this.mDirs = dirs; - this.mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + mContext = context; + mDirs = dirs; + mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } @Override - public View getView(int position, View view, ViewGroup parent) { + public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; - if (view == null) { - view = mInflater.inflate(R.layout.directory_item, parent, false); - holder = new ViewHolder(view); - view.setTag(holder); + if (convertView == null) { + convertView = mInflater.inflate(R.layout.directory_item, parent, false); + holder = new ViewHolder(convertView); + convertView.setTag(holder); } else { - holder = (ViewHolder) view.getTag(); + holder = (ViewHolder) convertView.getTag(); } 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() .into(holder.dirThumbnail); - return view; + return convertView; } @Override diff --git a/app/src/main/java/com/simplemobiletools/gallery/adapters/MediaAdapter.java b/app/src/main/java/com/simplemobiletools/gallery/adapters/MediaAdapter.java index b179b6411..0f4c2c2c8 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/adapters/MediaAdapter.java +++ b/app/src/main/java/com/simplemobiletools/gallery/adapters/MediaAdapter.java @@ -22,21 +22,21 @@ public class MediaAdapter extends BaseAdapter { private final LayoutInflater mInflater; public MediaAdapter(Context context, List media) { - this.mContext = context; - this.mMedia = media; - this.mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + mContext = context; + mMedia = media; + mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } @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); ViewHolder holder; - if (view == null) { - view = mInflater.inflate(R.layout.video_item, parent, false); - holder = new ViewHolder(view); - view.setTag(holder); + if (convertView == null) { + convertView = mInflater.inflate(R.layout.video_item, parent, false); + holder = new ViewHolder(convertView); + convertView.setTag(holder); } else { - holder = (ViewHolder) view.getTag(); + holder = (ViewHolder) convertView.getTag(); } if (medium.getIsVideo()) { @@ -48,7 +48,7 @@ public class MediaAdapter extends BaseAdapter { final String path = medium.getPath(); Glide.with(mContext).load(path).placeholder(R.color.tmb_background).centerCrop().crossFade().into(holder.photoThumbnail); - return view; + return convertView; } @Override diff --git a/app/src/main/java/com/simplemobiletools/gallery/adapters/MyPagerAdapter.java b/app/src/main/java/com/simplemobiletools/gallery/adapters/MyPagerAdapter.java index 76c598dde..ba66b06ab 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/adapters/MyPagerAdapter.java +++ b/app/src/main/java/com/simplemobiletools/gallery/adapters/MyPagerAdapter.java @@ -23,8 +23,8 @@ public class MyPagerAdapter extends FragmentStatePagerAdapter { public MyPagerAdapter(ViewPagerActivity act, FragmentManager fm, List media) { super(fm); - this.mActivity = act; - this.mMedia = media; + mActivity = act; + mMedia = media; mFragments = new HashMap<>(); }