xml布局如下
<FrameLayout
android:id="@+id/fl_content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.test.view.banner.view.BannerViewPager
android:id="@+id/banner_container"
android:layout_width="match_parent"
android:layout_height="300dp"
android:elevation="10dp"/>
<com.test.view.indicator.CircleIndicator
android:id="@+id/ci_indicator"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="bottom"
android:layout_marginBottom="48dp"
app:ci_width="15dp"
app:ci_height="15dp"
app:ci_margin="5dp"
app:ci_drawable="@drawable/shape_selected"
app:ci_animator="@animator/scale_with_alpha"/>
</FrameLayout>
想把轮播指示器放在ViewPager上层,但是使用
ciIndicator.bringToFront();也不起作用,定位原因ViewPager中属性android:elevation="10dp"属性冲突,需要去掉属性