コード例 #1
0
 protected override void OnFinishInflate()
 {
     if (ChildCount != 0)
     {
         for (int i = 0; i < ChildCount; i++)
         {
             var child = GetChildAt(i);
             if (child.GetType() == typeof (OverscrollListeningListView))
             {
                 if (_listView != null)
                     throw new Exception("Only one ListView can be a child!");
                 _listView = child as OverscrollListeningListView;
                 _listView.OnOverscrolled += ListViewOnOnOverscrolled;
             }
             else
             {
                 _header = GetChildAt(i) as View;
             }
         }
     } 
     base.OnFinishInflate();
 }
コード例 #2
0
 protected override void OnFinishInflate()
 {
     if (ChildCount != 0)
     {
         for (int i = 0; i < ChildCount; i++)
         {
             var child = GetChildAt(i);
             if (child.GetType() == typeof(OverscrollListeningListView))
             {
                 if (_listView != null)
                 {
                     throw new Exception("Only one ListView can be a child!");
                 }
                 _listView = child as OverscrollListeningListView;
                 _listView.OnOverscrolled += ListViewOnOnOverscrolled;
             }
             else
             {
                 _header = GetChildAt(i) as View;
             }
         }
     }
     base.OnFinishInflate();
 }