Skip to content

Commit

Permalink
#12 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz committed Feb 21, 2017
1 parent 83b5f93 commit 2a5a0a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/android/pager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class Pager extends common.Pager {
get android() {
return this._android;
}

get pagesCount() {
return this._getValue(Pager.pagesCountProperty);
}
Expand Down Expand Up @@ -223,6 +223,9 @@ export class PagerAdapter extends android.support.v4.view.PagerAdapter {

instantiateItem(collection: android.view.ViewGroup, position: number) {
const item = this.owner.items[position];
if (!item.parent) {
this.owner._addView(item);
}
const nativeView: android.support.v4.view.ViewPager = item._nativeView;
collection.addView(nativeView);
return nativeView;
Expand Down

0 comments on commit 2a5a0a5

Please sign in to comment.