-
Notifications
You must be signed in to change notification settings - Fork 816
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
Added Favourites section #607
Conversation
Code Climate has analyzed commit 8993b1f and detected 20 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
app/src/main/java/swati4star/createpdf/fragment/FavouritesFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/swati4star/createpdf/fragment/FavouritesFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/swati4star/createpdf/fragment/ViewFilesFragment.java
Outdated
Show resolved
Hide resolved
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.
Too many formatting mistakes. Always check for these mistakes in the files changed section after opening a PR.
app/src/main/java/swati4star/createpdf/fragment/HomeFragment.java
Outdated
Show resolved
Hide resolved
Okay I will look into all changes. @Swati4star please tell what do you think about the replies which I gave to some above comments. Thanks |
@Swati4star Please review now. |
implements SharedPreferences.OnSharedPreferenceChangeListener { | ||
|
||
private Activity mActivity; | ||
private SharedPreferences mSharedPreferences; |
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.
we already have this instance of SharedPreferences. Use this. Don't create new variable for this
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.
Yeah will remove it.
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.
You werent supposed to remove mSharedPreferences
* @param view | ||
* @param id | ||
*/ | ||
private void viewVisibility(SharedPreferences sharedPreferences, View view, String id) { |
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.
no need to receive SharedPreferences parameter
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.
Actually we need it to get the boolean value for a given id
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.
You will directly be able to use mSharedPreferences
variable. There wont be any need to get this as a parameter
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.
Yeah I got it now. I had misunderstood you.
app/src/main/res/values/strings.xml
Outdated
@@ -85,6 +85,7 @@ | |||
<string name="successToast">Images successfully added.</string> | |||
|
|||
<!-- Navigation drawer strings --> | |||
<string name="img_to_pdf">Images to PDF</string> |
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 change required?
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.
Because this is used as a key
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.
We dont need translations of keys, so we add keys in a constants file.
https://github.com/Swati4star/Images-to-PDF/blob/master/app/src/main/java/swati4star/createpdf/util/Constants.java
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.
Okay will change it then.
Bundle savedInstanceState) { | ||
View rootview = inflater.inflate(R.layout.favourites_fragment, container, false); | ||
ButterKnife.bind(this, rootview); | ||
SharedPreferences sharedPreferences = PreferenceManager |
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.
instead of creating sharedPreferences
, I asked you to use previous mSharedPreferences
variable. You have deleted it.
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.
I understood the other way around.
@Swati4star Do tell if there are any other changes. I will make a final commit tonight. Thanks |
I already mentioned all the required changes. |
Yeah other than those. |
removed extra blank lines.
@Swati4star All changes have been seen into. Thanks! |
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.
Looks good
Awesome @jddeep 👍 |
Description.
Fixes #563
Type of change
Just put an x in the [] which are valid.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
./gradlew assembleDebug assembleRelease
./gradlew checkstyle
Checklist: