Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何使用ViewPagerIndicator库创建固定选项卡?_Android - Fatal编程技术网

Android 如何使用ViewPagerIndicator库创建固定选项卡?

Android 如何使用ViewPagerIndicator库创建固定选项卡?,android,Android,我想使用viewpagerindicator库创建一些选项卡,但这些选项卡的样式与Play Store选项卡类似。(未修复)并且我希望创建固定选项卡。我想我将不得不覆盖标题页指示器,但我不知道如何才能做到 要解释清楚: ---> 我的viewpager xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/an

我想使用viewpagerindicator库创建一些选项卡,但这些选项卡的样式与Play Store选项卡类似。(未修复)并且我希望创建固定选项卡。我想我将不得不覆盖标题页指示器,但我不知道如何才能做到

要解释清楚: --->

我的viewpager xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#FFFFFF">

    <com.viewpagerindicator.TitlePageIndicator
       android:id="@+id/titles_pageindicator"
    android:padding="10dip"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:background="#000000"
    android:textColor="#FFFFFF"
    style="@style/Widget.TabPageIndicator"
        />
    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1"

        />

</LinearLayout>


谢谢

这里用代码和示例简单地解释了您真正需要的!