File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
tns-core-modules/ui/list-view Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -56,13 +56,10 @@ export class ListView extends ListViewBase {
5656
5757 const listView = new android . widget . ListView ( this . _context ) ;
5858 listView . setDescendantFocusability ( android . view . ViewGroup . FOCUS_AFTER_DESCENDANTS ) ;
59- this . updateEffectiveRowHeight ( ) ;
6059
6160 // Fixes issue with black random black items when scrolling
6261 listView . setCacheColorHint ( android . graphics . Color . TRANSPARENT ) ;
6362
64- // listView.setId(this._androidViewId);
65-
6663 ensureListViewAdapterClass ( ) ;
6764 const adapter = new ListViewAdapterClass ( this ) ;
6865 listView . setAdapter ( adapter ) ;
@@ -77,6 +74,8 @@ export class ListView extends ListViewBase {
7774
7875 public initNativeView ( ) : void {
7976 super . initNativeView ( ) ;
77+ this . updateEffectiveRowHeight ( ) ;
78+
8079 const nativeView : any = this . nativeViewProtected ;
8180 ( < any > nativeView ) . itemClickListener . owner = this ;
8281 const adapter = ( < any > nativeView ) . adapter ;
@@ -97,6 +96,12 @@ export class ListView extends ListViewBase {
9796 super . disposeNativeView ( ) ;
9897 }
9998
99+ public onLoaded ( ) {
100+ super . onLoaded ( ) ;
101+ // Without this call itemClick won't be fired... :(
102+ this . requestLayout ( ) ;
103+ }
104+
100105 public refresh ( ) {
101106 const nativeView = this . nativeViewProtected ;
102107 if ( ! nativeView || ! nativeView . getAdapter ( ) ) {
You can’t perform that action at this time.
0 commit comments