12

我在视图底部有一个视图寻呼机库和一个圆形页面指示器。如果可能的话,我想将页面指示器放在视图寻呼机前面并使其透明,就像在 iphone 图片库中一样。你知道怎么做吗?

在此处输入图像描述

解决方案:

这是作为解决方案的xml代码。感谢@sanna

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


<android.support.v4.view.ViewPager
    android:id="@+id/gallery_view"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent"
    />

<com.viewpagerindicator.CirclePageIndicator
    android:id="@+id/indicator"
    android:padding="10dip"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:layout_alignParentBottom="true"
    />
</RelativeLayout>

这是我画廊的新外观。

在此处输入图像描述

4

1 回答 1

18

我会先将 RelativeLayout 与您的 Pager 一起使用覆盖整个视图,然后使用 parentAlignBottom=true 添加指示器视图。

于 2012-05-29T07:32:28.227 回答