i'm using coordinatorlayout , viewpager inside. problem is, first entries of list (in first page of viewpager) hidden tabs. when use linearlayout instead of coordinatorlayout, works fine.
- how fix overlap?
- should floatingbutton added here or in listview xml?

here's xml:
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/themeoverlay.appcompat.dark.actionbar"> <android.support.design.widget.tablayout android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content"/> </android.support.design.widget.appbarlayout> <android.support.v4.view.viewpager android:id="@+id/pager_list_views" android:layout_width="match_parent" android:layout_height="match_parent"> </android.support.v4.view.viewpager> <android.support.design.widget.floatingactionbutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|right" android:layout_margin="16dp" android:src="@android:drawable/ic_menu_add" app:layout_anchor="@id/pager_list_views" app:layout_anchorgravity="bottom|right|end" /> </android.support.design.widget.coordinatorlayout>
add viewpager
app:layout_behavior="@string/appbar_scrolling_view_behavior" if use coordinatorlayout you'll have specifify behaviour, it's safer if control these aspects of design.
Comments
Post a Comment