-
Notifications
You must be signed in to change notification settings - Fork 18
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
add ability to enter gps location manually #181
Conversation
Thanks for the PR implementing #73 , @constambeys |
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.
Nice contribution. I like how you used method overloading and rewrote the storeLocation method a bit to make it more generic and available for reuse and thus avoid code duplication.
I've added some minor remarks as comments in the code.
As soon as I'm able to test I might add a few more remarks.
src/java/com/github/ruleant/getback_gps/AbstractGetBackGpsActivity.java
Outdated
Show resolved
Hide resolved
is it ok now? |
Great, thanks for the changes. |
Hi @constambeys However, input/boundary checking should be included :
I was unable to enter a negative number, so I guess you have to change the input type for the longitude and latitude input fields. |
builder.create().show(); | ||
} | ||
public final void enterLocation() { | ||
if (mBound) { |
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.
should be if (!mBound) {
If you want to test the app, you can find some info on how to build and deploy the app using a vagrant box : https://github.com/ruleant/getback_gps/wiki/Development |
fixed check now |
Great stuff, @constambeys! |
moved |
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.
Great stuff, @constambeys
Again apologies for the late reaction. I'm a bit busy at the moment and unfortunately I can't find much time for working on the getback_gps android app, or testing/reviewing contributions. But that doesn't mean I don't appreciate your work and contribution, on the contrary.
I think your contributed 'manual location entry' form is nearly ready to merge with the code base. I've added a few cosmetic remarks regarding strings, that should be easy to fix.
After that, there's a few administrative things :
- don't forget to add your name to the Copyright notice at the beginning of each code file you made changes to. Look for the Copyright line where my name is mentioned and add one with your name :
Copyright (C) 2019 Timotheos Constambeys
- add an entry to the
Changelog
file (in the 0.7 release section), something like :issue #73 : add form to manually enter a location, thanks to Timotheos Constambeys
- can you rebase your branch to the master branch and squash all your commits into 1?
That way your work on this feature is all in one commit, which makes the commit history cleaner.
usegit rebase -i upstream/master
(whereupstream
is the name of my repo that you use in your config)
Tip : For future work, it's better to use a separate branch to do your development (and rebase that branch regularly to upstream master), then you avoid those unnecesary merge commits.
res/values/strings.xml
Outdated
<string name="cancel">Cancel</string> | ||
<string name="store_location">Store Location</string> | ||
<string name="enter_location">Enter Location</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.
better : "Enter destination manually"
this way it indicates you can manually enter a destination.
MenuItem miRenameDest = menu.findItem(R.id.menu_renamedestination); | ||
if (isBound()) { | ||
// enable store location button if a location is set | ||
miStoreLocation.setEnabled(mService.getLocation() != null); | ||
miEnterLocation.setEnabled(mService.getLocation() != null); |
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.
Manual entry can be enabled any time, it doesn't depend on a current location being present, so this can be miEnterLocation.setEnabled(true);
= (EditText) dialogView.findViewById(R.id.location_longtitude); | ||
// Set the layout for the dialog | ||
builder.setView(dialogView) | ||
.setTitle(R.string.store_location) |
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 should use the 'R.string.enter_location' string for the title
After merging your feature, would you be interested in contributing some more? |
Thanks for your help and guidance. At the moment I don't have much free time but this is a great project and will keep an eye of it in the future !! |
Merged! Thanks for your contribution. It will be part of the upcoming v0.7 release. |
@constambeys Version v0.7 was released, including the form you added! |
No description provided.