-
Notifications
You must be signed in to change notification settings - Fork 814
fix: Changed the UI and functionality of buttons in Lux Meter #1303
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
Conversation
CloudyPadmal
left a comment
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.
For icons use xml/svg files
| } | ||
| invalidateOptionsMenu(); | ||
| break; | ||
| case R.id.save_csv_data: |
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.
Change this to record_csv_data as it is changed in all other places
|
@CloudyPadmal All changes are done. Please review. |
| android:viewportHeight="24.0" | ||
| android:tint="?attr/colorControlNormal"> | ||
| <path | ||
| android:fillColor="#FFF" |
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 color is hard coded because referring to resources file from this file isn't supported on API <21.
CloudyPadmal
left a comment
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.
|
@CloudyPadmal I have used vector drawables only. You can check the extension of the file it's .xml. I have also updated the apk. Have a look. |
| android:height="24dp" | ||
| android:viewportWidth="24.0" | ||
| android:viewportHeight="24.0" | ||
| android:tint="?attr/colorControlNormal"> |
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.
Applying tint attributes shows a warning
Resource references will not work correctly in images generated for this vector icon for API < 21
Current min SDK is 16. Please remove this tint attribute from icons in this PR.
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.
Sure @CloudyPadmal
|
@harsh-2711 In this PR, even If I don't click on Export data the CSV file is still getting created in my external storage, if that is the case then what is point of having export data button. |
|
@harsh-2711 Can you make this PR only concerned with UI and remove the play/pause functionalities because I created them in my PR. |
CloudyPadmal
left a comment
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.
Fix only the issue you have mentioned this PR is fixing. Refer to best practices.
|
@harsh-2711 what is the update on this? |
|
@Avjeet Only changing the buttons makes no sense. I have completed working on the issue of the file being created. I will soon update the PR. Also, I will change the title of this PR. |
|
@Avjeet @CloudyPadmal I have made the suggested changes. Please review. I have also made this suggested changes in PR #1320. Good catch @Avjeet |
|
@harsh-2711 Actually the problem I mentioned can be solved by storing the data initially in some temporary database and then if the user presses export data then retrieve the data from the database and store it in CSV file which I had done in PR. Doing this will also allow us to create the Logged data activity that Mario mentioned in the previous meeting. I have made that changes in PR #1323. |
|
@Avjeet A user opens an instrument only when he wants to use it. Therefore, it's not logical to freeze the instrument until he clicks the play button. In this PR, the user will be able to use the instrument as soon as he opens it and will able to record the data if he wants. Also, for the database issue, I can store the data first in a database and then in a file when a user clicks Export Data if you want (Currently I am doing the same but I am storing data in a file). Else you can add this functionality in your PR #1323. And I don't think there's anything difficult for a user to understand how to use the buttons in the instrument as I have used the icons from Material Design library of Google. |
CloudyPadmal
left a comment
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'll move forward from here
|
@harsh-2711 In last meeting it has been discussed there is no need of delete and export button here in lux meter it will be shifted to logged data activity and also could you try to make a icon like this |
mariobehling
left a comment
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.
@harsh-2711 Please change the button in a way that users can understand that this is a recording button more easily, e.g. as proposed by @Avjeet or something similar to below.
|
@CloudyPadmal @harsh-2711 @cweitat I think the changes from this PR also got merged into the code with the PR #1333. |
|
@harsh-2711 Ok harsh I have made the new icon and all the changes in my PR pls review it. |




Fixes #1284
Changes:
Changed the label in the BottomNavigationMenu
Changed the saved icon to record and pause icon
Added delete and export data features
Screenshot/s for the changes:
confusingBtns.zip
The updated icons screenshot: (@harsh-2711 please resize screenshots in PRs, I've done it here)

Checklist: [Please tick following check boxes with
[x]if the respective task is completed]strings.xml,dimens.xmlandcolors.xmlwithout hard-coding themstrings.xml,dimens.xmlorcolors.xmlAPK for testing:
app-debug.zip