【发布时间】:2013-02-19 18:49:45
【问题描述】:
我注意到最新版本的 ViewPagerIndicator 支持 ICS 样式分隔符,我尝试关注问题和解决方案,但无论我做什么,我都无法让分隔符显示在操作栏上的选项中TitlePageIndicator。我添加了 IcsLayout 作为容器,放置了分隔符、showDividers 和其他属性,但仍然一无所获。这是我的布局(奇怪的是,如果我将 IcsLayout 切换到 viewpager 指示器之一,应用程序就会崩溃):
<com.actionbarsherlock.internal.widget.IcsLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.sosick.android.brink"
android:layout_width="match_parent"
android:divider="#ffffff"
android:showDividers="middle"
android:dividerPadding="8dp"
android:dividerHeight="10dp"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.viewpagerindicator.TitlePageIndicator
android:id="@+id/tpi_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
textColor="@color/text_light"
android:background="@drawable/ab_stacked_solid_brink"
app:topPadding="10dp"
app:footerPadding="15dp"
app:footerColor="#a4ded7"
app:footerIndicatorHeight="2dp"
app:footerIndicatorStyle="underline"
app:footerLineHeight="2dp"
app:selectedBold="false" />
<android.support.v4.view.ViewPager
android:id="@+id/vp_pages"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</com.actionbarsherlock.internal.widget.IcsLinearLayout>
【问题讨论】:
-
阅读页面似乎他们声明它可以与 TabPageIndicator 一起使用,所以我不确定 TitleIndicator 是否可以...?
-
请张贴草图或参考,以便更好地了解您想要实现的目标。谢谢。
-
如果您查看此应用程序,请注意 Title Pager 上的垂直分隔线,这就是我想要实现的目标。 24.media.tumblr.com/8044b5ed0a7f8ad04468def5973275d7/…
-
标签之间需要竖线吗?对吗?
-
是的,这正是我正在寻找的,但在 ActionBarSherlock 和 ViewPager 的上下文中。
标签: android actionbarsherlock android-viewpager viewpagerindicator