Xamarin Android Tutorial 10 Sliding Tab Interface

Joe Rock · 80K views · 2014 · 46:06

Open on YouTube

Software (other)UX & UI designtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering or asking about building a sliding tab layout with ViewPager in Xamarin.Android, since the common Java examples need porting to C#.

Recommended by 1 people across 1 different months, 2016 to 2018.

What it is

Part 10 of Joe Rock's Xamarin Android tutorial series, a 46-minute walkthrough of building a sliding tab layout like the one in the Google Play Store. It covers the SlidingTabStrip and SlidingTabScrollView classes and wiring them to a ViewPager in C#.

What people said

Recommends Robbit · 2018-01 · Stack Overflow · on “PagerTabStrip Show tabs in single page”

You need SlidingTabLayout class and SlidingTabStrip class. The link you posted, they are java codes, you just need change them to c# codes and then you will solve your problem. here is a vedio baout SlidingTabLayout [this video] , and here is a demo which contains the classes [LINK] , just copy it to your project and reference in you layout.

Cites mohammad.pro · 2016-08 · Stack Overflow · on “xamarin ViewPager Android”

I was trying to create a Sliding-Tab-Layout. I followed this tutorial Sliding Tab Layout [this video] and it was great, but I wanted to Load Specific Layout in each TabView I also want to make each one loaded, when I select it or scroll to it just like facebook application. The reason is not to take so much time to load for each View in ViewPager and there is the classes: SlidingTabStrip using System; using System.Collections.Generic; using System.Linq; using System.Text; using Android.App; using Android.Content; using Android.OS; using Android.Runtime; using Android.Views; using Android.Widget; using Android.Graphics; using Android.Util; namespace SlidingTabLayoutTutorial { public class SlidingT

Cites Appeltants Ronald · 2017-04 · Stack Overflow · on “FindFragmentById in Android.Support.V4.App.Fragment”

I used 2 tutorils from Joe Rock for implementing SlidingTabLayout [this video] and using google maps [LINK] in Xamarin. Both works fine as i follow the tutorials but whhen i wanna combine these i get errors. I can't get the FindFragmentById working. MainActivity public class MainActivity : FragmentActivity { private ViewPager mViewPager; private SlidingTabScrollView mScrollView; protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mScrollView = FindViewById<SlidingTabScrollView>(Resource.Id.sliding_tabs); mViewPager = FindViewById<ViewPager>(Resource.Id.viewPager); mViewPager.Adapter = new Sa

Cites Abhinash · 2017-08 · Stack Overflow · on “How to add page in sliding tab layout in Xamarin Android”

Include the PagerSlidingTabStrip widget in your layout. This should usually be placed above the ViewPager it represents. <com.refractored.PagerSlidingTabStrip android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="? attr/actionBarSize" android:background="?attr/colorPrimary" /> In your OnCreate method (or OnCreateView for a fragment), bind the widget to the ViewPager. // Initialize the ViewPager and set an adapter var pager = FindViewById<ViewPager>(Resource.Id.pager); pager.Adapter = new TestAdapter(SupportFragmentManager); // Bind the tabs to the ViewPager var tabs = FindViewById<PagerSlidingTabStrip>(Resource.Id.tabs); tabs.SetViewPager(pager); If your adapter i