-
Notifications
You must be signed in to change notification settings - Fork 14
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
BeerXML Support #20
BeerXML Support #20
Conversation
Show malt ounces to 2 significant figures, hop ounces to 3
…ng for a new recipe or to open.
Conflicts: BrewShop/src/main/res/values/strings.xml
|
||
double size = Double.parseDouble(sections[0]); | ||
String unit = sections[1]; | ||
quantity = new Quantity(); |
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.
Can we make 'quantity' a method variable? Otherwise I think GSON will try to serialize the 'quantity' member variable to storage.
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.
I made it into a member variable since it is a more convertable friendly class. I would prefer to use it instead of Weight (or bring the same functionality to Weight) that allows conversions between units (i.e. allows you to convert a value from Ounces to grams or to pounds or whatever you want.
Hey, just a couple of comments above. The BeerXML branch looks awesome. I'm ready to merge just this in if that's cool. |
Updated as per the comments. You can merge this whenever you want, I'll add BeerXML export later. |
I do like the Quanity class better than the Weight class. I have no problem replacing it provided it doesn't break support for already-created recipes. |
This is the first set of commits, I'll be doing some tidying up tonight to sort some things out, but I figured I'd push this so you can take a look first.
** Returns an array of recipes