This is a example code to make Tab UI android with kotlin
Add this dependecy to build.grade (Module:app)
implementation 'com.google.android.material:material:1.0.0'
Setting base application theme on res/values/style.xml
, set attribute parent style to NoActionBar
like this :
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
- Tab 1 ( OneFragment.kt, fragment_one.xml )
- Tab 2 ( TwoFragment.kt, fragment_one.xml )
- Tab 3 ( ThreeFragment.kt, fragment_one.xml )