今天突然有兴趣,想学习kotlin,就想撸一个页面切换。。
implementation 'com.android.support:design:26.1.0' implementation 'com.android.support:support-v4:26.1.0'
这两个是需要导入的包,升级了as 3.0把compile 换成了implementation
在xml中写入
<android.support.design.widget.TabLayout android:id="@+id/tab_main" android:layout_width="match_parent" android:layout_height