Skip to content

Instantly share code, notes, and snippets.

@cakfan
Created August 17, 2016 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cakfan/7b7499b6c3caeabd1854347d4706e587 to your computer and use it in GitHub Desktop.
Save cakfan/7b7499b6c3caeabd1854347d4706e587 to your computer and use it in GitHub Desktop.
Sliding Tab Layout using Font Awesome
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.taufan.materialdesigntheme.MainActivity">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/putih"
app:tabGravity="fill"
app:tabIndicatorColor="@color/colorPrimary"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/colorPrimary"
app:tabTextAppearance="@style/tabTeksStyle"
app:tabTextColor="@color/teksColorPrimary" />
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment