Fixed one bug where updating text size would not appropriately recalculate the text width
Complete rehaul of how dividers are drawn to fix some issues
Rehaul of Divider Info
The previous setup for drawing dividers was mimicking the LinearLayout params to correctly position the dividers in the right spot. However, this had the drawback that if a layout_weight was not specified or fixed widths were given for the buttons, then the dividers would all get drawn at the left.
The new setup is to pass the SegmentedButton class to the divider LinearLayout objects (renamed class to ButtonActor's) so that the width can be measured based on the actual width of the SegmentedButton. Some additional math is performed to offset the width by the divider width appropriately.
The EmptyView class was split into another class called ButtonActor for the divider empty view.
Added some test cases where some button groups are added at run-time to ensure that works as expected. Added test case with fixed-size buttons to ensure that is working as expected.
Changes
Rehaul of Divider Info
The previous setup for drawing dividers was mimicking the LinearLayout params to correctly position the dividers in the right spot. However, this had the drawback that if a layout_weight was not specified or fixed widths were given for the buttons, then the dividers would all get drawn at the left.
The new setup is to pass the SegmentedButton class to the divider LinearLayout objects (renamed class to ButtonActor's) so that the width can be measured based on the actual width of the SegmentedButton. Some additional math is performed to offset the width by the divider width appropriately.
The EmptyView class was split into another class called ButtonActor for the divider empty view.
Added some test cases where some button groups are added at run-time to ensure that works as expected. Added test case with fixed-size buttons to ensure that is working as expected.
Fixes #21