[英]How to Set indicator on view pager?
i am trying to show the indicator on view pager such a way that indicator become in bottom of the image and align Center horizontal and center vertical I used Frame layout for this purpose but still not getting desired result.. i think i am missing any attribute my XML code is: 我试图将指示器显示在视图寻呼机上,以使指示器进入图像底部并对齐“水平”和“垂直”中心。为此,我使用了“框架”布局,但仍未得到理想的结果。。我想我没有任何属性我的XML代码是:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/baneer"
android:layout_width="fill_parent"
android:layout_height="140dp"
android:background="#000000"
android:orientation="vertical">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<android.support.v4.view.ViewPager
android:id="@+id/myfivepanelpager"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_gravity="center" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="#f6f7f9"
android:orientation="horizontal">
<com.viewpagerindicator.CirclePageIndicator
android:id="@+id/view_indicator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@android:color/transparent" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
试试这个: android:layout_alignParentBottom="true"
而不是android:layout_gravity="bottom"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.