Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyTabbedPageRenderer : TabbedPageRenderer
- {
- private TabLayout tabLayout = null;
- protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e)
- {
- base.OnElementChanged(e);
- this.tabLayout = (TabLayout)this.GetChildAt(1);
- var selectPosition = this.tabLayout.SelectedTabPosition;
- tabLayout.TabMode = TabLayout.ModeScrollable;
- tabLayout.TabGravity = TabLayout.GravityFill;
- Handler h = new Handler();
- Action myAction = () =>
- {
- tabLayout.GetTabAt(selectPosition).Select();
- };
- h.PostDelayed(myAction, 1);
- }
- }
Add Comment
Please, Sign In to add comment