Add layout bound metadata to 9-patch files and make layouts take them into account.
This CL contains a proposed API for dealing with layout bounds.
This solution exposes:
1. Class: Insets - for storing layout Insets (and later possibly padding).
2. Methods: View:(get/set)LayoutInsets() - for storing layoutBounds.
3. Methods: ViewGroup:(get/set)LayoutMode() - for controlling layoutMode.
It also iuncudes the changes to GridLayout to support layout bounds.
Change-Id: I60c836b6530b61c5abf37f93ee9c44aad73573f1
It is not possible for teh user to override the assigned padding values
because the XML attributes are processed in the opposite order.
Also, make the XML and Java examples grid3.xml and Activity2.java
consistent in preparation for a move to API demos.
Change-Id: I47334f9f5a46a8a528067d88350dd70eaa38ff33
GridLayout needs to call measure on children after it knows how large children should be
Also:
. Remove deprecated methods and XML attributes.
. Stop Spaces having margins by default.
. Remove getSpacers() and findUsed()
. Change default for row/columnOrderPreserved() from false to true.
. Improve automatic index allocation mechanism to use individual maxima.
Change-Id: Id79fbb2e70a0bf2002191ec2a9746547d896de72
5064532: GridLayout with initial "stretchy" row and "gone" view in last row doesn't stretch properly
Also:
. Infer stretchibility from whether or not gravity is defined.
. Make algorithms for handling flexibility within cell groups consistent
with those acting between cells groups (via constraint system).
. Hide and deprecate methods taking flexibility argument.
. Hide and deprecate CAN_STRETCH constant.
Both deprecated features will be removed after references are removed from platform.
Change-Id: Iabf2bf19f35cf30b8ec49c99b49a0550fd495125
Also:
. removed static import of R.styleable - this is non-standard
. removed final modifier from DEBUG flag,
this prevents the compiler from excluding the debugging code but
allows debugging code to be enabled externally
. added override to removeAllViews() as GridLayout needs to be notified whever hiearchy changes.
Change-Id: I2409289bce7c6638eff320ffd48a6c0704e77fa8
. Change name of Group to Spec
(with the addition of the fglexibility field, this class no longer represents a group)
. Replace overloaded Group/Spec constructors with factory method
. Bugfix for measure() when alignmentMode == ALIGN_BOUNDS
. Bury as much Java API as possible, to minimize restrictions on future API enhancements
- make all field access in Group package private
- use factory methods in place of field assignment
Change-Id: I46a5027a013bf7c3110b77108b8fd0427165cd18
A cell's ability to shrink or stretch is now integrated with the
constraints system, which is now supplied with both upper and lower
bounds.
Also:
. Remove package private access (pseudo) annotation
. Remove rowWeight and columnWeight attributes and fields
. Remove code to handle weights
Change-Id: I9e2432101d15466c621f51ae362435051fab5764
. Fixed spelling.
. Added comments on internal methods.
. Adopted the suggested internal name changes to improve clarity.
. Added UNDEFINED constant to public API to avoid making reference to Integer.MAX_VALUE in docs.
. Added final everywhere, then removed it.
. Make the Interval class package private so that it can be put somewhere more general later.
. Tidy code, removing maximize flag throughout.
. Remove last of allocations taking place during layout.
. Implement measureChild() etc.
. Added LinearLayout alignment compatibility mode, and made it the default.
Change-Id: I6a4ffa022d97d68138d1903d3830a20278815435
https://android-git.corp.google.com/g/#change,109891