[英]How to Set indicator on view pager?
我試圖將指示器顯示在視圖尋呼機上,以使指示器進入圖像底部並對齊“水平”和“垂直”中心。為此,我使用了“框架”布局,但仍未得到理想的結果。。我想我沒有任何屬性我的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.