Skip to content

Conversation

@harsh-2711
Copy link
Contributor

@harsh-2711 harsh-2711 commented Jul 28, 2018

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]

  • I have used resources from strings.xml, dimens.xml and colors.xml without hard-coding them
  • No modifications done at the end of resource files strings.xml, dimens.xml or colors.xml
  • I have reformatted code in every file included in this PR [CTRL+ALT+L]
  • My code does not contain any extra lines or extra spaces
  • I have requested reviews from other members

APK for testing:
app-debug.zip

@harsh-2711 harsh-2711 added the In Progress Developer is working on the problem label Jul 28, 2018
Copy link
Collaborator

@CloudyPadmal CloudyPadmal left a 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

@harsh-2711 harsh-2711 self-assigned this Jul 29, 2018
@harsh-2711 harsh-2711 removed the In Progress Developer is working on the problem label Jul 30, 2018
}
invalidateOptionsMenu();
break;
case R.id.save_csv_data:
Copy link
Collaborator

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

@harsh-2711
Copy link
Contributor Author

@CloudyPadmal All changes are done. Please review.

android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="#FFF"
Copy link
Contributor Author

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.

@harsh-2711 harsh-2711 added the Status: Review Required Requested reviews from peers and maintainers label Jul 30, 2018
@Avjeet
Copy link
Contributor

Avjeet commented Jul 30, 2018

icon is showing properly

Copy link
Collaborator

@CloudyPadmal CloudyPadmal left a comment

Choose a reason for hiding this comment

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

Icons are not sharp. Can you use vector drawables provided by Android Studio itself?
icons

@harsh-2711
Copy link
Contributor Author

@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">
Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Avjeet
Copy link
Contributor

Avjeet commented Aug 2, 2018

@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.

@Avjeet
Copy link
Contributor

Avjeet commented Aug 2, 2018

@harsh-2711 Can you make this PR only concerned with UI and remove the play/pause functionalities because I created them in my PR.

Copy link
Collaborator

@CloudyPadmal CloudyPadmal left a 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.

@Avjeet
Copy link
Contributor

Avjeet commented Aug 3, 2018

@harsh-2711 what is the update on this?

@harsh-2711
Copy link
Contributor Author

@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.

@harsh-2711
Copy link
Contributor Author

@Avjeet @CloudyPadmal I have made the suggested changes. Please review. I have also made this suggested changes in PR #1320. Good catch @Avjeet

@Avjeet
Copy link
Contributor

Avjeet commented Aug 4, 2018

@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.
That is why I asked to make this PR related to UI i.e., change the icons, remove the setting and Map option.
Moreover, in this PR we have another issue that it is difficult for the user to understand play pause if the lux meter always keeps running.

@harsh-2711
Copy link
Contributor Author

harsh-2711 commented Aug 5, 2018

@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.

@harsh-2711 harsh-2711 closed this Aug 5, 2018
@harsh-2711 harsh-2711 reopened this Aug 5, 2018
@harsh-2711 harsh-2711 changed the title fix: Changed the confusing UI of Lux Meter fix: Changed the UI and functionality of buttons in Lux Meter Aug 5, 2018
Copy link
Collaborator

@CloudyPadmal CloudyPadmal left a 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

@Avjeet
Copy link
Contributor

Avjeet commented Aug 7, 2018

@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
image
@CloudyPadmal what do you think??

Copy link
Member

@mariobehling mariobehling left a 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.

record

@Avjeet
Copy link
Contributor

Avjeet commented Aug 8, 2018

@CloudyPadmal @harsh-2711 @cweitat I think the changes from this PR also got merged into the code with the PR #1333.
@harsh-2711 You shouldn't have squashed the changes in the PR #1333 until your previous PR got merged.

@harsh-2711
Copy link
Contributor Author

harsh-2711 commented Aug 8, 2018

@Avjeet I did a rebase and reset so all the commits got squashed. But I did make a note about that in the PR body. I think @cweitat missed it.

@Avjeet
Copy link
Contributor

Avjeet commented Aug 8, 2018

@harsh-2711 Ok harsh I have made the new icon and all the changes in my PR pls review it.
So should we close this PR then ?

@harsh-2711 harsh-2711 closed this Aug 8, 2018
@CloudyPadmal CloudyPadmal removed the Status: Review Required Requested reviews from peers and maintainers label Dec 13, 2018
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.

5 participants