am bad7eed8: Merge "Add removeRule() to RelativeLayout LayoutParams" into jb-mr1-dev
* commit 'bad7eed8aa27fa1c0b417b805b47881a1ec532d7': Add removeRule() to RelativeLayout LayoutParams
This commit is contained in:
@@ -28452,6 +28452,7 @@ package android.widget {
|
||||
method public void addRule(int, int);
|
||||
method public java.lang.String debug(java.lang.String);
|
||||
method public int[] getRules();
|
||||
method public void removeRule(int);
|
||||
field public boolean alignWithParent;
|
||||
}
|
||||
|
||||
|
||||
@@ -1306,6 +1306,21 @@ public class RelativeLayout extends ViewGroup {
|
||||
mRulesChanged = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a layout rule to be interpreted by the RelativeLayout.
|
||||
*
|
||||
* @param verb One of the verbs defined by
|
||||
* {@link android.widget.RelativeLayout RelativeLayout}, such as
|
||||
* ALIGN_WITH_PARENT_LEFT.
|
||||
* @see #addRule(int)
|
||||
* @see #addRule(int, int)
|
||||
*/
|
||||
public void removeRule(int verb) {
|
||||
mRules[verb] = 0;
|
||||
mInitialRules[verb] = 0;
|
||||
mRulesChanged = true;
|
||||
}
|
||||
|
||||
private boolean hasRelativeRules() {
|
||||
return (mInitialRules[START_OF] != 0 || mInitialRules[END_OF] != 0 ||
|
||||
mInitialRules[ALIGN_START] != 0 || mInitialRules[ALIGN_END] != 0 ||
|
||||
|
||||
Reference in New Issue
Block a user