android - How to make a bottom bar in Material theme Drawer activity -
android - How to make a bottom bar in Material theme Drawer activity -
for music application, add together bottom bar works current playback display. utilize 1 fragments, add together in mainactivity. i'm not sure how in layout way. may help me there?
<android.support.v4.widget.drawerlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:fitssystemwindows="true" android:background="@color/sonatic_darker" android:layout_height="match_parent"> <!-- framelayout display fragments --> <framelayout android:id="@+id/frame_container" android:fitssystemwindows="true" android:cliptopadding="true" android:layout_width="match_parent" android:layout_height="match_parent" /> <!-- <listview android:id="@+id/list_slidermenu" android:fitssystemwindows="true" android:cliptopadding="false" android:layout_width="270dp" android:layout_height="fill_parent" android:layout_gravity="start" android:choicemode="singlechoice" android:divider="@android:color/transparent" android:dividerheight="1dp" android:listselector="@drawable/list_selector" android:background="@drawable/sidebar_background_xml"/> --> <relativelayout android:id="@+id/relative_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/sidebar_background_xml" android:layout_gravity="start" > <listview android:id="@+id/list_slidermenu" android:fitssystemwindows="true" android:cliptopadding="false" android:layout_width="270dp" android:layout_height="fill_parent" android:layout_gravity="start" android:choicemode="singlechoice" android:divider="@android:color/transparent" android:dividerheight="1dp" android:listselector="@drawable/list_selector" android:background="@android:color/transparent"/> <relativelayout android:layout_width="match_parent" android:layout_height="60dp" android:layout_alignparentbottom="true" > <imageview android:id="@+id/profile_image" android:layout_width="25dp" android:cliptopadding="true" android:layout_height="wrap_content" android:fitssystemwindows="true" android:layout_alignparentleft="true" android:layout_centerinparent="true" android:layout_marginleft="17dp" android:layout_marginright="24dp" android:src="@drawable/ic_sonatic" android:layout_centerhorizontal="true" /> <textview android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="match_parent" android:fitssystemwindows="true" android:cliptopadding="true" android:fontfamily="sans-serif-light" fontpath="seraregular.ttf" android:layout_torightof="@id/profile_image" android:minheight="?android:attr/listpreferreditemheightsmall" android:textappearance="?android:attr/textappearancelistitemsmall" android:textcolor="@color/list_item_title_selected" android:textcolorhighlight="@color/list_item_title_selected" android:gravity="center_vertical" android:textsize="18sp" android:text="@string/app_name" android:paddingright="10dp"/> <textview android:id="@+id/counter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:fitssystemwindows="true" android:cliptopadding="true" android:background="@android:color/transparent" android:layout_alignparentright="true" android:layout_centervertical="true" fontpath="seraregular.ttf" android:layout_marginright="8dp" android:textcolor="#ffffff"/> </relativelayout> </relativelayout>
hey follow below code drawer layout per needs,
<android.support.v4.widget.drawerlayout android:id="@+id/drawer" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayou android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <framelayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /> <linearlayou android:layout_width="match_parent" android:layout_height="wrap_content"> <!--your bottom bar elements--> </linearlayou> </linearlayou> <!--your drawer menu--> <listview android:layout_width="match_parent" android:layout_height="wrap_content"></listview> </android.support.v4.widget.drawerlayout>
android navigation android-actionbar drawer
Comments
Post a Comment