java - Make Bottom Navigation Seperate From Fragment Layout -
i have navigation menu in fragment layout. facing issue when scroll viewpager scrolling navigation menubar too. looking ugly want move fragment activity layout menu function attached in fragment unable move it.
my activity layout below
<?xml version="1.0" encoding="utf-8"?> <relativelayout 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:id="@+id/appbarmain" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:titletextcolor="?attr/textcolor" app:popuptheme="@style/apptheme.popupoverlay" /> <android.support.design.widget.tablayout android:id="@+id/tabs" android:layout_width="match_parent" app:tabgravity="fill" app:tabtextappearance="@style/minecustomtabtext" app:tabmode="fixed" android:layout_height="wrap_content" /> </android.support.design.widget.appbarlayout> <android.support.v4.view.viewpager android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_behavior="@string/appbar_scrolling_view_behavior" android:layout_alignparenttop="true" android:layout_alignparentleft="true" android:layout_alignparentstart="true" /> </relativelayout>
and fragment layout below
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:ads="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.recyclerview android:id="@+id/listquoteview" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/backcolor" android:layout_above="@+id/startappbanner" android:layout_alignparenttop="true" android:layout_alignparentleft="true" android:layout_alignparentstart="true" /> <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_above="@+id/pagenavlayout" ads:adsize="smart_banner" android:visibility="gone" ads:adunitid="@string/admob_banner"> </com.google.android.gms.ads.adview> <com.startapp.android.publish.ads.banner.banner android:background="?attr/backcolor" android:id="@+id/startappbanner" android:layout_above="@+id/pagenavlayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerhorizontal="true"/> <linearlayout android:layout_width="match_parent" android:layout_height="@dimen/toolbar" android:orientation="horizontal" app:layout_constraintright_torightof="parent" android:id="@+id/pagenavlayout" android:background="?attr/maincolor" app:layout_constraintleft_toleftof="parent" app:layout_constraintbottom_tobottomof="parent" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:layout_alignparentstart="true"> <relativelayout android:layout_weight="2" android:id="@+id/butprev" style="@style/selectableitembackground" android:clickable="true" android:layout_width="0dp" android:layout_height="match_parent"> <imageview android:layout_width="@dimen/nav_but_size" android:scaletype="fitcenter" android:tint="?attr/textcolor" android:layout_centerinparent="true" android:src="@drawable/tool_prev" android:layout_height="@dimen/nav_but_size" /> </relativelayout> <textview android:background="?attr/list_text" android:layout_width="1dp" android:layout_height="match_parent" /> <textview android:id="@+id/textpagecount" style="@style/selectableitembackground" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="6" android:clickable="true" android:layout_gravity="center_vertical" android:gravity="center" android:lines="1" android:textappearance="@style/textappearance.appcompat.headline" android:textstyle="bold" android:padding="10dp" android:text="page 1 of 67" android:textcolor="?attr/textcolor" android:textsize="@dimen/textpagecount" /> <textview android:background="?attr/list_text" android:layout_width="1dp" android:layout_height="match_parent" /> <relativelayout android:layout_weight="2" style="@style/selectableitembackground" android:clickable="true" android:id="@+id/butnext" android:layout_width="0dp" android:layout_height="match_parent"> <imageview android:layout_centerinparent="true" android:src="@drawable/tool_next" android:tint="?attr/textcolor" android:layout_width="@dimen/nav_but_size" android:layout_height="@dimen/nav_but_size" /> </relativelayout> </linearlayout> <progressbar android:id="@+id/progressbar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerhorizontal="true" android:layout_centervertical="true" android:visibility="gone" /> </relativelayout>
i want move linear layout id pagenavlayout activity. how can ? thanks
Comments
Post a Comment