use of app.insti.adapter.ImageViewPagerAdapter in project IITB-App by wncc.
the class FileComplaintFragment method showImage.
private void showImage(List<String> uploadedImagesUrl) {
if (viewPager != null) {
try {
imageViewPagerAdapter = new ImageViewPagerAdapter(getActivity(), uploadedImagesUrl);
place_holder_image.setVisibility(View.GONE);
image_holder_view.setVisibility(View.VISIBLE);
viewPager.setAdapter(imageViewPagerAdapter);
indicator.setViewPager(viewPager);
imageViewPagerAdapter.registerDataSetObserver(indicator.getDataSetObserver());
viewPager.getAdapter().notifyDataSetChanged();
synchronized (viewPager) {
viewPager.notifyAll();
}
imageViewPagerAdapter.notifyDataSetChanged();
progressDialog.dismiss();
} catch (Exception e) {
e.printStackTrace();
}
}
}
use of app.insti.adapter.ImageViewPagerAdapter in project IITB-App by wncc.
the class ComplaintDetailsFragment method initViewPagerForImages.
private void initViewPagerForImages(Venter.Complaint detailedComplaint) {
ViewPager viewPager = mView.findViewById(R.id.complaint_image_view_pager);
if (viewPager != null) {
try {
ImageViewPagerAdapter imageFragmentPagerAdapter = new ImageViewPagerAdapter(getActivity(), detailedComplaint);
viewPager.setAdapter(imageFragmentPagerAdapter);
circleIndicator.setViewPager(viewPager);
imageFragmentPagerAdapter.registerDataSetObserver(circleIndicator.getDataSetObserver());
Objects.requireNonNull(viewPager.getAdapter()).notifyDataSetChanged();
synchronized (viewPager) {
viewPager.notifyAll();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Aggregations