Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- holder.viewThumbnail.setOnClickListener(v ->
- {
- FetchImage fetchImage = new FetchImage(MainActivity.mainActivity, rootView, position);
- fetchImage.execute();
- });
- protected final Void doInBackground(WeakReference<Activity>... params)
- {
- if(MainActivity.animalList.get(position).getImage() == null)
- {
- MainActivity mainActivity = weakReferenceActivity.get();
- if(mainActivity != null)
- {
- new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(mainActivity, mainActivity.getString(R.string.fetching_image), Toast.LENGTH_SHORT).show());
- }
- }
- return null;
- }
- protected void onPostExecute(Void result)
- {
- super.onPostExecute(result);
- MainActivity mainActivity = weakReferenceActivity.get();
- if(mainActivity != null)
- {
- mainActivity.dialogShow(view, C.NO, C.DIALOG_IMAGE, "", "", position);
- }
- }
Add Comment
Please, Sign In to add comment