daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class MyTabbedPageRenderer : TabbedPageRenderer
  2.  {
  3.      private TabLayout tabLayout = null;
  4.  
  5.      protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e)
  6.      {
  7.          base.OnElementChanged(e);
  8.  
  9.          this.tabLayout = (TabLayout)this.GetChildAt(1);
  10.  
  11.          var selectPosition = this.tabLayout.SelectedTabPosition;
  12.  
  13.          tabLayout.TabMode = TabLayout.ModeScrollable;
  14.          tabLayout.TabGravity = TabLayout.GravityFill;
  15.  
  16.          Handler h = new Handler();
  17.          Action myAction = () =>
  18.          {
  19.              tabLayout.GetTabAt(selectPosition).Select();
  20.          };
  21.  
  22.          h.PostDelayed(myAction, 1);
  23.      }
  24.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top