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

Attributes support etc. #23

Merged
merged 8 commits into from Apr 6, 2015
Merged

Attributes support etc. #23

merged 8 commits into from Apr 6, 2015

Conversation

tchar
Copy link
Contributor

@tchar tchar commented Mar 2, 2015

Ok I changed a lot of stuff.
What did I do.
According to #21 and #20 I:

  • Added support for custom border_width (stroke_margin) via the dimension's file. This changes the appearance of all the radiogroups in the project.
  • Polished the code: Basically added a LayoutSelector inner class to provide everything related about the layouts and made the public void updateBackground() cleaner and shorter.
  • And finally added support to individually change the appearance of each radiogroup by adding a styleable, so users can now declare their border_width and corner_radius from the layout files. The SegmentedGroup parses those attributes and changes the radius via Gradient.setCornerRadii() method.
    Because of that there is no need to keep so many xml files for each radiobutton. We only need 2. One for checked and one for unchecked.
    The rest are done via the LayoutSelector and the radii tables.

Have a look at the screenshots under my attributes-support branch.
Any comments are gratefully accepted. Tell me what you like, what you don't so I can change it.

tchar.

@hoang8f
Copy link
Collaborator

hoang8f commented Apr 6, 2015

@tchar sorry for my late reply.
You did a really great job.
I very appreciated 👍

hoang8f added a commit that referenced this pull request Apr 6, 2015
@hoang8f hoang8f merged commit 836dd14 into Kaopiz:master Apr 6, 2015
@tchar
Copy link
Contributor Author

tchar commented Apr 7, 2015

Thank you.
I am happy to help and contribute.

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.

None yet

2 participants