Search in sources :

Example 31 with PhilmMovie

use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.

the class MovieController method fetchDetailMovieFromTmdb.

private void fetchDetailMovieFromTmdb(final int callingId, int id) {
    Preconditions.checkNotNull(id, "id cannot be null");
    PhilmMovie movie = mMoviesState.getMovie(id);
    if (movie != null) {
        movie.markFullFetchStarted(PhilmModel.TYPE_TMDB);
    }
    executeTask(new FetchTmdbDetailMovieRunnable(callingId, id));
}
Also used : PhilmMovie(app.philm.in.model.PhilmMovie) FetchTmdbDetailMovieRunnable(app.philm.in.tasks.FetchTmdbDetailMovieRunnable)

Example 32 with PhilmMovie

use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.

the class SideMenuFragment method showMovieCheckin.

@Override
public void showMovieCheckin(WatchingMovie checkin) {
    mCheckinLayout.setVisibility(View.VISIBLE);
    mCheckinImageView.setVisibility(View.VISIBLE);
    final PhilmMovie movie = checkin.movie;
    mCheckinTitleTextView.setText(movie.getTitle());
    mCheckinImageView.loadBackdrop(movie);
    mCheckinImageView.setColorFilter(mColorFilter);
}
Also used : PhilmMovie(app.philm.in.model.PhilmMovie)

Example 33 with PhilmMovie

use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.

the class MovieGridAdapter method getView.

@Override
public View getView(int position, View convertView, ViewGroup viewGroup) {
    View view = convertView;
    if (view == null) {
        view = mLayoutInflater.inflate(R.layout.item_grid_movie, viewGroup, false);
    }
    final PhilmMovie movie = getItem(position).getListItem();
    final TextView title = (TextView) view.findViewById(R.id.textview_title);
    title.setText(movie.getTitle());
    title.setVisibility(View.VISIBLE);
    final PhilmImageView imageView = (PhilmImageView) view.findViewById(R.id.imageview_poster);
    imageView.setAutoFade(false);
    imageView.loadPoster(movie, new PhilmImageView.Listener() {

        @Override
        public void onSuccess(PhilmImageView imageView, Bitmap bitmap) {
            title.setVisibility(View.GONE);
        }

        @Override
        public void onError(PhilmImageView imageView) {
            title.setVisibility(View.VISIBLE);
        }
    });
    return view;
}
Also used : PhilmMovie(app.philm.in.model.PhilmMovie) Bitmap(android.graphics.Bitmap) TextView(android.widget.TextView) PhilmImageView(app.philm.in.view.PhilmImageView) PhilmImageView(app.philm.in.view.PhilmImageView) TextView(android.widget.TextView) View(android.view.View)

Example 34 with PhilmMovie

use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.

the class MovieController method fetchMovieCastIfNeeded.

private void fetchMovieCastIfNeeded(final int callingId, String id) {
    Preconditions.checkNotNull(id, "id cannot be null");
    PhilmMovie movie = mMoviesState.getMovie(id);
    if (movie != null && PhilmCollections.isEmpty(movie.getCast())) {
        fetchMovieCredits(callingId, movie);
    }
}
Also used : PhilmMovie(app.philm.in.model.PhilmMovie)

Example 35 with PhilmMovie

use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.

the class MovieController method fetchMovieCrewIfNeeded.

private void fetchMovieCrewIfNeeded(final int callingId, String id) {
    Preconditions.checkNotNull(id, "id cannot be null");
    PhilmMovie movie = mMoviesState.getMovie(id);
    if (movie != null && PhilmCollections.isEmpty(movie.getCrew())) {
        fetchMovieCredits(callingId, movie);
    }
}
Also used : PhilmMovie(app.philm.in.model.PhilmMovie)

Aggregations

PhilmMovie (app.philm.in.model.PhilmMovie)39 MoviesState (app.philm.in.state.MoviesState)17 ArrayList (java.util.ArrayList)4 TextView (android.widget.TextView)2 WatchingMovie (app.philm.in.model.WatchingMovie)2 PhilmImageView (app.philm.in.view.PhilmImageView)2 SQLiteDatabase (android.database.sqlite.SQLiteDatabase)1 Bitmap (android.graphics.Bitmap)1 Bundle (android.os.Bundle)1 View (android.view.View)1 Display (app.philm.in.Display)1 ColorScheme (app.philm.in.model.ColorScheme)1 PhilmMovieCredit (app.philm.in.model.PhilmMovieCredit)1 PhilmMovieVideo (app.philm.in.model.PhilmMovieVideo)1 PhilmPerson (app.philm.in.model.PhilmPerson)1 PhilmPersonCredit (app.philm.in.model.PhilmPersonCredit)1 PhilmUserProfile (app.philm.in.model.PhilmUserProfile)1 FetchTmdbDetailMovieRunnable (app.philm.in.tasks.FetchTmdbDetailMovieRunnable)1 FetchTmdbMovieImagesRunnable (app.philm.in.tasks.FetchTmdbMovieImagesRunnable)1 FetchTraktDetailMovieRunnable (app.philm.in.tasks.FetchTraktDetailMovieRunnable)1