android - How to pass onClick from view pager to view below it? -
i have view pager above tablayout, pages have hide tablayout, cannot click on tabs.
<android.support.design.widget.tablayout android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="50dip" android:layout_alignparentbottom="true" app:tabbackground="@drawable/bg_tab" app:tabgravity="fill" app:tabindicatorcolor="@null" app:tabindicatorheight="0dip" app:tabminwidth="0dip" app:tabmode="fixed" app:tabselectedtextcolor="@color/white" app:tabtextappearance="@style/minecustomtabtext" app:tabtextcolor="@color/white" /> <android.support.v4.view.viewpager android:id="@+id/view_pager" android:layout_width="match_parent" android:layout_height="match_parent" /> </relativelayout>
i suggest use yourview.bringtofront()
.
change view's z order in tree, it's on top of other sibling views. ordering change may affect layout, if parent container uses order-dependent layout scheme (e.g., linearlayout). prior kitkat method should followed calls requestlayout() , invalidate() on view's parent force parent redraw new child ordering.
Comments
Post a Comment