Integrating a toolbar for application

zojozalojyti

New Member
I'm trying to integrate a bottom tool bar into my application.The bar will be used in a number of different activities so I am using the following line in my XML to include it with each layout:\[code\]<include android:layout_height="0dip" layout="@layout/test2" />\[/code\]The output for test2.xml is as follows:
HMcKz.png
When I include it in my main activity the output looks like this:
UE3uz.png
I would like to have it so that the bar appears as close to the bottom as possible..I have no idea how to do this. Any suggestions would be much appreciated!My activity_main.xml file looks like this:\[code\]<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="fill_parent"android:gravity="center|center_vertical"android:orientation="vertical"android:textAlignment="center"android:weightSum="1" ><LinearLayout android:layout_width="match_parent" android:layout_height="130dp" android:layout_weight="1" android:orientation="vertical" android:weightSum="1" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/homeTitle" android:textAppearance="?android:attr/textAppearanceMedium" /> <Button android:id="@+id/orderBtn" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_margin="10dp" android:text="@string/orderbtn" /> <Button android:id="@+id/viewBtn" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dp" android:text="@string/viewbtn" /> <Button android:id="@+id/feedbackBtn" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dp" android:text="@string/feedbackbtn" /> <Button android:id="@+id/payBtn" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_margin="10dp" android:text="@string/paybtn" /> <include android:layout_height="0dip" layout="@layout/test2" /></LinearLayout>\[/code\]
 
Back
Top