-
Notifications
You must be signed in to change notification settings - Fork 858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancements #95
Enhancements #95
Conversation
@KaveriKR there seems to be a build error
|
Thank you for pointing the error. |
@@ -56,7 +63,7 @@ public void onAttach(Context context) { | |||
public void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setHasOptionsMenu(true); | |||
setRetainInstance(true); | |||
// setRetainInstance(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The saveInstanceState bundle is be null with this set to true, and we need the saved state after orientation change in the onViewCreated so that we can restore .Hence I removed it.
@Override | ||
public boolean onOptionsItemSelected(MenuItem item) { | ||
switch (item.getItemId()) { | ||
case R.id.action_sort: | ||
moviesPresenter.firstPage(); | ||
// moviesPresenter.firstPage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have set it back.
@@ -1,5 +1,10 @@ | |||
package com.esoxjem.movieguide.listing; | |||
|
|||
import android.graphics.Movie; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is unused, but will remove it.
@@ -9,6 +14,8 @@ | |||
|
|||
void nextPage(); | |||
|
|||
void nextPage(int pageNumber, List<com.esoxjem.movieguide.Movie> movies); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package can be imported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done,imported the package.
@@ -33,7 +34,7 @@ | |||
public void setView(MoviesListingView view) { | |||
this.view = view; | |||
if(!showingSearchResult){ | |||
displayMovies(); | |||
//displayMovies(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setView was also resulting in the displaying of fetched movies after initializing the view.This resulted in multiple loading and displaying of initial page at first time. And overriding the restored state in other cases. Hence I have commented the display function here and managed the same through the firstPage() int the onViewCreated for the initial time with out showing twice .And the second problem also solved.
Also, please create separate PRs for each issue |
have updated |
Few enhancements made :
Added swipe refresh button to load the movies again dynamically without reopening the app. Useful in case when application is opened with blank screen in case of no internet.
Replaced deprecated Butterknife.findById with the android findViewById.
Added a play button on the trailers video layout to denote playable option.
.