-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