【问题标题】:Android ViewPagerIndicator - UnderlinePageIndicator on top instead of bottom?Android ViewPagerIndicator - UnderlinePageIndicator 在顶部而不是底部?
【发布时间】:2013-04-22 14:38:55
【问题描述】:

我正在使用 ActionBarSherlock + HoloEverywhere + ViewPagerIndicator 库。

  1. 有没有办法将 UnderlinePageIndicator 放在顶部而不是底部?
  2. 在 Jelly Bean 上,UnderlinePageIndicator 不会在几站时自动隐藏,而在 GingerBread 上却可以完美运行。有什么想法吗?

【问题讨论】:

    标签: android actionbarsherlock viewpagerindicator


    【解决方案1】:

    您可以使用 TabPageIndicator 并通过编辑名为 vpi_tab???_holo 的九个补丁 PNG 来更改下划线的外观。每个屏幕密度有 6 个。

    【讨论】:

      【解决方案2】:

      只要设置你想要的高度:

      <LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" >
      
      <com.viewpagerindicator.UnderlinePageIndicator
          android:id="@+id/pageIndicator"
          android:layout_height="2dp"
          android:layout_width="fill_parent"
          />
      
      <android.support.v4.view.ViewPager
          android:id="@+id/vp_pages"
          android:layout_width="match_parent"
          android:layout_height="match_parent" />
      </LinearLayout>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-02-10
        • 2015-03-09
        • 2016-10-14
        • 1970-01-01
        • 2013-10-17
        • 2023-02-07
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多