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

Image-to-pdf: Filename InputField is autofilled with the filename #796

Merged
merged 2 commits into from
Oct 6, 2019

Conversation

sudeshim3
Copy link
Contributor

FileName input field is auto-filled followed by _pdf suffix.
Say, if the file name is android.jpg the autofill text is android_pdf

Description

Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
If there are any UI change, please include the screenshots also.

Fixes #(issue)

Type of change

Just put an x in the [] which are valid.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • ./gradlew assembleDebug assembleRelease
  • ./gradlew checkstyle

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codeclimate
Copy link

codeclimate bot commented Oct 2, 2019

Code Climate has analyzed commit 4d7e81b and detected 0 issues on this pull request.

View more on Code Climate.

/**
* Returns the last file name obtained from filepath
*/
private String getLastFileName(ArrayList<String> filesPath) {
Copy link
Owner

Choose a reason for hiding this comment

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

there are already a lot of functions in this file.
Can we move this and next function to FileUtils?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, moved to FileUtils.

return nameWithoutExt + getString(swati4star.createpdf.R.string.pdf_suffix);
}

private String stripExtension(String str) {
Copy link
Owner

Choose a reason for hiding this comment

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

please add javadoc style comments to newly added functions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup added javadoc.

@@ -194,7 +195,8 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
}

@OnClick(R.id.tvNoOfImages)
public void onClick() { }
public void onClick() {
Copy link
Owner

Choose a reason for hiding this comment

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

why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, sorry. before committing I had done "reformat code" which had added space between parentheses and moved the brace to the new line. I have reverted the code style the way it was before.

@Swati4star
Copy link
Owner

great @sudeshim3 👍

@Swati4star
Copy link
Owner

Merging this PR
but still #779 is not yet resolved as it says for "text to PDF". @sudeshim3 you can work on this if you want.

@Swati4star Swati4star merged commit 734093e into Swati4star:master Oct 6, 2019
@sudeshim3
Copy link
Contributor Author

yup will work on it.

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