mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Segment-bar safety fix
This commit is contained in:
@ -37,7 +37,7 @@ function onSlideContentWidthPropertyChanged(data: dependencyObservable.PropertyC
|
||||
|
||||
export class SideBar extends common.SideBar {
|
||||
public _createUI() {
|
||||
this._android = new com.telerik.android.primitives.widget.sidedrawer.SideDrawer(this._context);
|
||||
this._android = new com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer(this._context);
|
||||
this._android.setDrawerSize(utils.layout.getDisplayDensity() * 280);
|
||||
|
||||
if (this.mainContent instanceof view.View) {
|
||||
|
@ -57,7 +57,7 @@ function onItemsPropertyChanged(data: dependencyObservable.PropertyChangeData) {
|
||||
view.android.addTab(tab);
|
||||
}
|
||||
|
||||
if (view.android.getCurrentTab() !== view.selectedIndex) {
|
||||
if (types.isNumber(view.selectedIndex) && view.android.getCurrentTab() !== view.selectedIndex) {
|
||||
view.android.setCurrentTab(view.selectedIndex);
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ export class SegmentedBar extends common.SegmentedBar {
|
||||
|
||||
public _createUI() {
|
||||
this._android = new OurTabHost(this._context, null);
|
||||
if (this._android.getCurrentTab() !== this.selectedIndex) {
|
||||
if (types.isNumber(this.selectedIndex) && this._android.getCurrentTab() !== this.selectedIndex) {
|
||||
this._android.setCurrentTab(this.selectedIndex);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user