cleaned comments
This commit is contained in:
@@ -81,7 +81,7 @@ public class MovieDetailsFragment extends Fragment implements Callback<VideoList
|
|||||||
if(getArguments().containsKey(BUNDLE_ARG_MOVIE)) {
|
if(getArguments().containsKey(BUNDLE_ARG_MOVIE)) {
|
||||||
mMovie = getArguments().getParcelable(BUNDLE_ARG_MOVIE);
|
mMovie = getArguments().getParcelable(BUNDLE_ARG_MOVIE);
|
||||||
Log.d(TAG, "Bundled movie: " + mMovie.getTitle());
|
Log.d(TAG, "Bundled movie: " + mMovie.getTitle());
|
||||||
isFavorite = mProvderHelper.isFavorite(mMovie); // TODO async?
|
isFavorite = mProvderHelper.isFavorite(mMovie);
|
||||||
} else
|
} else
|
||||||
throw new RuntimeException(TAG + " opened without bundled movie!");
|
throw new RuntimeException(TAG + " opened without bundled movie!");
|
||||||
|
|
||||||
@@ -135,8 +135,6 @@ public class MovieDetailsFragment extends Fragment implements Callback<VideoList
|
|||||||
Toast.makeText(getActivity(), "Failed to load videos: " + t.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "Failed to load videos: " + t.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO high res image for video link
|
|
||||||
|
|
||||||
@OnClick(R.id.movie_details_btReviews)
|
@OnClick(R.id.movie_details_btReviews)
|
||||||
public void onReviewButtonClick(View view) {
|
public void onReviewButtonClick(View view) {
|
||||||
final ProgressDialog dialog = new ProgressDialog(getContext());
|
final ProgressDialog dialog = new ProgressDialog(getContext());
|
||||||
@@ -226,7 +224,7 @@ public class MovieDetailsFragment extends Fragment implements Callback<VideoList
|
|||||||
/**
|
/**
|
||||||
* removes or adds the movie to stored favorites
|
* removes or adds the movie to stored favorites
|
||||||
*/
|
*/
|
||||||
private void switchFavorite() { // TODO async?
|
private void switchFavorite() {
|
||||||
if(isFavorite)
|
if(isFavorite)
|
||||||
mProvderHelper.removeFavorite(mMovie);
|
mProvderHelper.removeFavorite(mMovie);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ public class MovieListFragment extends Fragment implements Callback<MovieList> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadMovieListFromFavorites() {
|
private void loadMovieListFromFavorites() {
|
||||||
// TODO async?
|
|
||||||
mMovieList = null;
|
mMovieList = null;
|
||||||
Cursor cursor = new FavoriteProviderHelper(getContext().getContentResolver()).getAllFavorites();
|
Cursor cursor = new FavoriteProviderHelper(getContext().getContentResolver()).getAllFavorites();
|
||||||
mMovieGridView.setAdapter(new CursorMovieListAdapter(cursor, (MovieNavigation) getActivity()));
|
mMovieGridView.setAdapter(new CursorMovieListAdapter(cursor, (MovieNavigation) getActivity()));
|
||||||
|
|||||||
Reference in New Issue
Block a user