use of com.example.android.unsplash.ui.ThreeTwoImageView in project atlas by alibaba.
the class DetailViewPagerAdapter method instantiateItem.
@Override
public Object instantiateItem(ViewGroup container, int position) {
View view = layoutInflater.inflate(R.layout.detail_view, container, false);
ThreeTwoImageView photoview = view.findViewById(R.id.photo);
TextView authorview = view.findViewById(R.id.author);
Photo photo = allPhotos.get(position);
photoview.setTransitionName(String.format(photoTransitionFormat, photo.id));
authorview.setText(photo.author);
authorview.setTransitionName(String.format(authorTransitionFormat, photo.id));
onViewBound(photoview, photo);
container.addView(view);
return view;
}
Aggregations