Skip to content

Instantly share code, notes, and snippets.

@siscofran999
Last active January 31, 2020 17:10
Show Gist options
  • Save siscofran999/82a51a43e840995cceecfe074af0fe5a to your computer and use it in GitHub Desktop.
Save siscofran999/82a51a43e840995cceecfe074af0fe5a to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
tools:context=".MainActivity"
android:background="@color/colorBg">
<View
android:id="@+id/view"
android:layout_width="wrap_content"
android:layout_height="1dp"
android:background="@color/colorText"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<RelativeLayout
android:id="@+id/rl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view">
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginTop="10dp"
app:tabTextColor="@color/colorText"
app:tabSelectedTextColor="@color/colorTextSelected"
app:tabBackground="@drawable/bg_tab"
app:tabIndicatorColor="@color/transparent"
app:tabGravity="fill"
app:tabRippleColor="@null"
app:tabMode="scrollable"/>
</RelativeLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/rl"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment