Skip to content
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

Closed
wants to merge 11 commits into from
Closed

Enhancements #95

wants to merge 11 commits into from

Conversation

KaveriKR
Copy link

@KaveriKR KaveriKR commented Apr 7, 2019

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.
    .

@esoxjem esoxjem mentioned this pull request Apr 8, 2019
@esoxjem
Copy link
Owner

esoxjem commented Apr 8, 2019

@KaveriKR there seems to be a build error

Output:  /bitrise/src/app/src/main/res/values-v21/styles.xml:37:5-90: AAPT: error: 
resource transition/explode (aka com.esoxjem.movieguide:transition/explode) not found.

@KaveriKR
Copy link
Author

KaveriKR commented Apr 8, 2019

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);
Copy link
Owner

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?

Copy link
Author

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();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Author

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;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect import

Copy link
Author

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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package can be imported

Copy link
Author

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();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented?

Copy link
Author

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.

@esoxjem
Copy link
Owner

esoxjem commented Apr 11, 2019

Also, please create separate PRs for each issue

@KaveriKR
Copy link
Author

Also, please create separate PRs for each issue

have updated

@esoxjem esoxjem closed this Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants