Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void bind(final ResultsItem item) {
- tv_title.setText(item.getTitle());
- tv_tanggal.setText(DateTime.getLongDate(item.getReleaseDate()));
- tv_deskripsi.setText(item.getOverview());
- Glide.with(itemView.getContext())
- .load(BuildConfig.BASE_URL_IMG + "w185" + item.getPosterPath())
- .apply(new RequestOptions()
- .placeholder(R.drawable.placeholder)
- .centerCrop())
- .into(img_poster);
- itemView.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- Intent intent = new Intent(itemView.getContext(), ScrollingActivity.class);
- intent.putExtra(ScrollingActivity.MOVIE_ITEM, new Gson().toJson(item));
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- ActivityOptionsCompat activityOptionsCompat = ActivityOptionsCompat
- .makeSceneTransitionAnimation((Activity) itemView.getContext(), img_poster, "poster");
- itemView.getContext().startActivity(intent, activityOptionsCompat.toBundle());
- } else itemView.getContext().startActivity(intent);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement