-
Notifications
You must be signed in to change notification settings - Fork 9
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
More gui work #18
More gui work #18
Conversation
switches to also use listener and ischecked correctly
Changed switch text size to AppCompat.Large"
Changed switch text size to AppCompat.Large"
the wrong string being used in prefs
Removed limit on number of files uploaded (as wakelock that was implemented ages ago should have fixed the time out issue)
Add logo to main activity
Background colour now dark green on all activities Changed app name under icon on phone main screen to Cacophony so it fits
Moved Test Record activity into main setup 'wizard'
Testing activity to Frequency activity. Added logic on Testing activity so can only use 'Very frequent recordings' and 'Short recordings' if using Test server.
… activity loads: if(!buttonView.isShown()){ return; }
causing an extra recording to fire after test record button was pressed.
uploadingIdlingResource.increment(); in RecordAndUpload as it was crashing - need to relook at this when get back to automated testing.
… next alarm is created
Added functionality for Help icon on each Activity Todo: Write appropriate help for each activity
Testing Activity hidden as default, enabled with secret hand shake Upload button disabled if no recordings to upload
Testing Activity hidden as default, enabled with secret hand shake Upload button disabled if no recordings to upload
Testing Activity hidden as default, enabled with secret hand shake Upload button disabled if no recordings to upload
Increased font in some activities
Moved upload files activity to Advanced and renamed it to Manage Recordings.
Change back and next button text Modified what fields say and show on Register Activity
…e unregistering the reciever when the fragment goes from view - but the 'are you sure' dialog does this. Now register and unregister the broadcast reciever on the onCreate and onStop methods.
…er has signedin and/or registerd.
Fixed: I've put the radio buttons in a scroll view..
… uploading): Added message to explain that you can swipe left/right. Shortened the title of the first screen in Advanced to make it clearer that you can swipe.
… uploading): Added message to explain that you can swipe left/right. Shortened the title of the first screen in Advanced to make it clearer that you can swipe.
Finished taking yes/no off switches. Next look at GPS
… location service if not already enabled.
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.
There's a lot here! Looks good to me. Just some little things.
//getView().findViewById(R.id.btnRecordNow).setEnabled(true); | ||
btnRecordNow.setEnabled(true); | ||
btnRecordNow.setVisibility(View.VISIBLE); | ||
} |
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.
if messageType is made uppercase first then you could use a switch statement here instead. That would probably be a little less verbose.
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 current version of Java that Android uses does not allow switch with Strings. I probably should have used enumerations... but won't change now.
https://stackoverflow.com/questions/14367629/android-coding-with-switch-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.
All good. This shows my relative inexperience with Java :)
|
||
prefs.setUseVeryFrequentRecordings(false); | ||
// swUseVeryFrequentRecordings.setChecked(false); | ||
// swUseVeryFrequentRecordings.setEnabled(false); |
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.
Do these commented out sections have to stay around?
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.
Removed them and have been through all other code and removed similar
// String webTokenBody = Util.decoded(webToken); | ||
// JSONObject jObject = new JSONObject(webTokenBody); | ||
// return jObject.getString("deviceName"); | ||
// } |
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.
delete?
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.
removed
thanks.
Should I tidy those things up before the merge or after?
Tim
EDIT - Decided to:
1) Merge
2) Create a new branch where I am tiding up code and adding automated testing back in (old tests no longer work due to major GUI changes).
________________________________
From: Menno Finlay-Smits <notifications@github.com>
Sent: Friday, 15 February 2019 5:52 PM
To: TheCacophonyProject/cacophonometer
Cc: Tim Hunt; Author
Subject: Re: [TheCacophonyProject/cacophonometer] More gui work (#18)
@mjs approved this pull request.
There's a lot here! Looks good to me. Just some little things.
________________________________
In app/src/main/java/nz/org/cacophony/cacophonometer/TestRecordFragment.java<#18 (comment)>:
+ } else if (messageType.equalsIgnoreCase("GETTING_READY_TO_RECORD")) {
+ tvMessages.setText(messageToDisplay);
+ } else if (messageType.equalsIgnoreCase("FAILED_RECORDINGS_NOT_UPLOADED")) {
+ tvMessages.setText(messageToDisplay);
+ } else if (messageType.equalsIgnoreCase("RECORD_AND_UPLOAD_FAILED")) {
+ tvMessages.setText(messageToDisplay);
+ } else if (messageType.equalsIgnoreCase("UPLOADING_FAILED_NOT_REGISTERED")) {
+ tvMessages.setText(messageToDisplay);
+ } else if (messageType.equalsIgnoreCase("RECORDING_STARTED")) {
+ tvMessages.setText(messageToDisplay);
+ } else if (messageType.equalsIgnoreCase("RECORDING_FINISHED")) {
+ tvMessages.setText(messageToDisplay);
+ //getView().findViewById(R.id.btnRecordNow).setEnabled(true);
+ btnRecordNow.setEnabled(true);
+ btnRecordNow.setVisibility(View.VISIBLE);
+ }
if messageType is made uppercase first then you could use a switch statement here instead. That would probably be a little less verbose.
________________________________
In app/src/main/java/nz/org/cacophony/cacophonometer/TestingFragment.java<#18 (comment)>:
+ }
+
+ Util.setUseTestServer(getActivity().getApplicationContext(), isChecked);
+
+// swShortRecordings.setEnabled(isChecked);
+// swUseVeryFrequentRecordings.setEnabled(isChecked);
+
+ if (!isChecked){
+ Prefs prefs = new Prefs(getActivity().getApplicationContext());
+ prefs.setUseShortRecordings(false);
+// swShortRecordings.setChecked(false);
+// swShortRecordings.setEnabled(false);
+
+ prefs.setUseVeryFrequentRecordings(false);
+// swUseVeryFrequentRecordings.setChecked(false);
+// swUseVeryFrequentRecordings.setEnabled(false);
Do these commented out sections have to stay around?
________________________________
In app/src/main/java/nz/org/cacophony/cacophonometer/Util.java<#18 (comment)>:
- return "";
- }
-
- String webTokenBody = Util.decoded(webToken);
- JSONObject jObject = new JSONObject(webTokenBody);
- return jObject.getString("deviceName");
- }
+// static String getDeviceName(String webToken) throws Exception {
+// if (webToken == null){
+// return "";
+// }
+//
+// String webTokenBody = Util.decoded(webToken);
+// JSONObject jObject = new JSONObject(webTokenBody);
+// return jObject.getString("deviceName");
+// }
delete?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#18 (review)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADtSVOQb_BhqY0ce_aSkTP8aNFgCEGmEks5vNj0GgaJpZM4a6vfo>.
|
Mostly finished work on new GUI so want to merge back into Master
Next - once back in Master, I'll add automatic testing back in and prune dead code/comments