Fix WrapLayout

Fix ScrollView
Fix Stylers.android
Remove some method from View class
Fix layout-helper test views
Fix all android failing tests
Remove onLayout on Button and TextBase
This commit is contained in:
hshristov
2015-07-30 17:27:35 +03:00
parent bd50fb5550
commit e58506563a
19 changed files with 280 additions and 239 deletions

View File

@ -1,6 +1,4 @@
import common = require("ui/button/button-common");
import utils = require("utils/utils");
import trace = require("trace");
global.moduleMerge(common, exports);
@ -36,26 +34,4 @@ export class Button extends common.Button {
}
}));
}
public onLayout(left: number, top: number, right: number, bottom: number): void {
if (this.android) {
var measuredWidth = this.getMeasuredWidth();
var measuredHeight = this.getMeasuredHeight();
var measureSpecs = this._getCurrentMeasureSpecs();
var widthModeIsNotExact = utils.layout.getMeasureSpecMode(measureSpecs.widthMeasureSpec) !== utils.layout.EXACTLY;
var heightModeIsNotExact = utils.layout.getMeasureSpecMode(measureSpecs.heightMeasureSpec) !== utils.layout.EXACTLY;
var width = right - left;
var height = bottom - top;
if ((Math.abs(measuredWidth - width) > 1 && widthModeIsNotExact) || (Math.abs(measuredHeight - height) > 1 && heightModeIsNotExact)) {
var widthMeasureSpec = utils.layout.makeMeasureSpec(width, utils.layout.EXACTLY);
var heightMeasureSpec = utils.layout.makeMeasureSpec(height, utils.layout.EXACTLY);
trace.write(this + ", measuredSize: (" + measuredWidth + ", " + measuredHeight + ")" + ", remeasure with: (" + width + ", " + height + ")", trace.categories.Layout);
this.android.measure(widthMeasureSpec, heightMeasureSpec);
}
}
super.onLayout(left, top, right, bottom);
}
}