-1
我创造我的第一个应用程序,并学习首次Java作为井的过程中,和我停留在工具栏上创建标签..将标签添加到Android 5.0工具栏?
我看了看this岗位。不过,我仍然对如何正确实施它们感到困惑。我是否应该下载SlidingTabsColors
文件,然后将它作为gradle.build
中的依赖项添加?
在本节:fragment_sample.xml
:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<android.support.v7.widget.Toolbar
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/my_awesome_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ThemeOverlay.AppCompat.ActionBar">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<com.example.android.common.view.SlidingTabLayout
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v7.widget.Toolbar>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:background="@android:color/white" />
</LinearLayout>
我不能添加com.example.android.common.view.SlidingTabLayout
布局。
谢谢
谢谢,生病了试试看! – 2014-12-25 00:21:16