Files
NativeScript/ui/button/button.android.ts
hshristov e58506563a 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
2015-08-03 13:49:11 +03:00

37 lines
849 B
TypeScript

import common = require("ui/button/button-common");
global.moduleMerge(common, exports);
export class Button extends common.Button {
private _android: android.widget.Button;
private _isPressed: boolean;
constructor() {
super();
this._isPressed = false;
}
get android(): android.widget.Button {
return this._android;
}
public _createUI() {
var that = new WeakRef(this);
this._android = new android.widget.Button(this._context);
this._android.setOnClickListener(new android.view.View.OnClickListener({
get owner() {
return that.get();
},
onClick: function (v) {
if (this.owner) {
this.owner._emit(common.Button.tapEvent);
}
}
}));
}
}