@Override public void displayMovieData(MovieDetailsModel movieDetailsModel) { // Setting up view with data String title = movieDetailsModel.getTitle(); mcollapsingtoolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar); mcollapsingtoolbar.setTitle(title); mcollapsingtoolbar.setExpandedTitleTextAppearance(R.style.CollapsedAppBar); mcollapsingtoolbar.setExpandedTitleTextAppearance(R.style.CollapsedAppBar); ImageView mbackdrop = (ImageView) findViewById(R.id.backdrop); Picasso.with(this).setLoggingEnabled(true); String mbackdropUrl = IMG_ENDPOINT + movieDetailsModel.getBackdropPath(); Picasso.with(this).load(mbackdropUrl).into(mbackdrop); adapter.setOverViewText(movieDetailsModel.getOverview()); movieDetailsPresenter.searchOnYoutube(title); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.details_entertainment); int id; id = getIntent().getExtras().getInt("id"); recyclerView = (RecyclerView) findViewById(R.id.YoutubeRecyclerview); recyclerView.setLayoutManager( new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)); adapter = new YouTubeAdapter(); recyclerView.setAdapter(adapter); movieDetailsPresenter = new MovieDetailsPresenter(this); movieDetailsPresenter.getMoviesDetailsData(id); toolbar = (Toolbar) findViewById(R.id.detailstoolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); }