Skip to main content


Showing posts with the label Tabs

Tabs : Material Design Tips

From google material design documentation Tabs make it easy to explore and switch between different views or functional aspects of an app or to browse categorized data sets. How to add? I. In your build.gradle add latest design and appcompat libraries. dependencies { compile '' compile '' compile ''// where X.X.X version// if you want to support android sdk < 13// you need to add support library v4 instead of v13} II. Make your activity extend publicclassMainActivityextendsAppCompatActivity{...} III. Declare TabLayout and ViewPager in your layout.xml file. <LinearLayoutxmlns:android=""android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><…