Skip to content
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

Float value is not accepted as Flex Grow on the sample application #112

Closed
hkurokawa opened this issue Sep 1, 2016 · 2 comments
Closed

Comments

@hkurokawa
Copy link
Contributor

Description

On the sample application, I changed Flex Grow for the last item from 0.0 to 1.0. I expected it made the item expand to the end of the line. However, the width of the item didn't change and when I opened the dialog again, Flex Grow was 0.0.

Environment

  • Mac OS X 10.11.5
  • Android Emulator, Nexus One, API 17
  • Android Studio 2.2 Beta 3

Steps

  1. Open the sample app
  2. Click the item 3
  3. Change the value of Flex Grow from 0.0 to 1.0
  4. Click OK on the dialog

Result

Nothing happens

Expected Result

The item 3 expands to the end of the line

Remarks

I found the below code and it seems the code failed to parse a text containing dots . as an integer, such as 1.0. In fact, when I input 1 instead of 1.0 at step 3, the result was as expected.

https://github.com/google/flexbox-layout/blob/master/app/src/main/java/com/google/android/apps/flexbox/FlexItemEditFragment.java#L376

I am wondering you might have to update your FlexEditTextWatcher so that it can accept a flow value as an input when the ID of the TextInputLayout is input_layout_flex_grow or input_layout_flex_shrink. I'm creating a small patch to fix it to clarify the point and will let you know when it's ready.

Thank you.

@hkurokawa hkurokawa changed the title A weird behaviour in the sample application Float value is not accepted as Flex Grow on the sample application Sep 1, 2016
@thagikura
Copy link
Contributor

Wow, thanks for the detailed description and even a PR! Really appreciate it.
Let me check your PR.

Thanks!

@thagikura
Copy link
Contributor

Fixed by #113.
Thanks again!

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

No branches or pull requests

2 participants