Search in sources :

Example 1 with ThreeTwoImageView

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;
}
Also used : ThreeTwoImageView(com.example.android.unsplash.ui.ThreeTwoImageView) TextView(android.widget.TextView) Photo(com.example.android.unsplash.data.model.Photo) ImageView(android.widget.ImageView) TextView(android.widget.TextView) ThreeTwoImageView(com.example.android.unsplash.ui.ThreeTwoImageView) View(android.view.View)

Aggregations

View (android.view.View)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 Photo (com.example.android.unsplash.data.model.Photo)1 ThreeTwoImageView (com.example.android.unsplash.ui.ThreeTwoImageView)1