예제 #1
0
 private void TabReselected(object sender, TabLayout.TabReselectedEventArgs e)
 {
     if (e.Tab.Text == "Student Info")
     {
         StudentInfoView.FindViewById <NestedScrollView>(Resource.Id.StudentScrollview).SmoothScrollTo(0, 0);
     }
 }
예제 #2
0
 private void OnTabLayoutOnTabReselected(object sender, TabLayout.TabReselectedEventArgs e)
 {
     if (_tabLayout.GetTabAt(e.Tab.Position) == _prevTab)
     {
         var hostFragment = _adapter.GetItem(_tabLayout.SelectedTabPosition) as HostFragment;
         hostFragment?.Clear();
     }
 }
예제 #3
0
 private void TabReselected(object sender,
                            TabLayout.TabReselectedEventArgs e)
 {
     if (e.Tab.Text == "Attendance")
     {
         _recyclerview.SmoothScrollToPosition(0);
     }
 }
예제 #4
0
 private void TabLayoutTabReselected(object sender, TabLayout.TabReselectedEventArgs e)
 {
     if (e.Tab.Text == "Events Signup")
     {
         if (_position > 10)
         {
             _eventRecyclerView.ScrollToPosition(10);
         }
         _eventRecyclerView.SmoothScrollToPosition(0);
     }
 }
예제 #5
0
 /* Scroll up to the top of the page if the "Announcements" layout is */
 /* selected                                                          */
 private void TabReselected(object sender,
                            TabLayout.TabReselectedEventArgs e)
 {
     if (e.Tab.Text == "Announcements")
     {
         if (AnnouncementAdapter.ViewPosition >= 10)
         {
             AnnouncementRecyclerView.ScrollToPosition(10);
         }
         AnnouncementRecyclerView.SmoothScrollToPosition(0);
     }
 }
예제 #6
0
 private void TabLayoutTabReselected(object sender,
                                     TabLayout.TabReselectedEventArgs newEvent)
 {
     /* Scroll to the top when the tab is reselected                        */
     if (newEvent.Tab.Text == App.Tabs.AcademicsPage[0].ToString())
     {
         if (_position > 10)
         {
             Activity.RunOnUiThread(() => _gradesRecyclerView.ScrollToPosition(10));
         }
         Activity.RunOnUiThread(() => _gradesRecyclerView.SmoothScrollToPosition(0));
     }
 }
 private void OnTabLayoutOnTabReselected(object sender, TabLayout.TabReselectedEventArgs e)
 {
     if (_tabLayout.GetTabAt(e.Tab.Position) == _prevTab)
     {
         var hostFragment = _adapter.GetItem(_tabLayout.SelectedTabPosition) as HostFragment;
         hostFragment?.Clear();
         var fragments = hostFragment.ChildFragmentManager.Fragments;
         if (fragments[fragments.Count - 1] is ICanOpenPost fragment)
         {
             fragment.ClosePost();
         }
     }
 }
예제 #8
0
 private void OnTabReselected(object sender, TabLayout.TabReselectedEventArgs e)
 {
     if (Browse.instance != null)
     {
         if (Browse.instance.focused)
             Browse.instance.ListView.SmoothScrollToPosition(0);
         else
             FolderBrowse.instance.ListView.SmoothScrollToPosition(0);
     }
     if (YoutubeSearch.instances != null)
     {
         foreach (YoutubeSearch instance in YoutubeSearch.instances)
         {
             if (instance.IsFocused)
             {
                 instance.ListView?.SmoothScrollToPosition(0);
             }
         }
     }
 }