android - Adding a horizontalScrollView to bottom navigation bar -
i have activity contains table layout , below have buttons, implemented sort of navigation bar using radio group , radio buttons. want add horizontal scroll view radio group, when try add navigation bar changes position top of activity collapse table layout , need navigation bar stick bottom of activity. appreciated. in advance.
here's xml code:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bckgroundchinese" android:id="@+id/bottom_layout" > <scrollview android:id="@+id/scrollview1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbaralwaysdrawverticaltrack="true" android:scrollbarfadeduration="0" android:scrollbarsize="12dip" > <horizontalscrollview android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:background="#3b3b3b" > <tablelayout android:id="@+id/mytablelayout" android:layout_width="match_parent" android:layout_height="276dp" android:background="@drawable/bckgroundchinese" > <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="no patients" /> </tablelayout> </horizontalscrollview> </scrollview> <button android:id="@+id/patient" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/radiogroup1" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:background="@drawable/buttonchinese" android:text="add patient" /> <button android:id="@+id/signtoutdr" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/patient" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:background="@drawable/buttonchinese" android:text="sign out" /> <button android:id="@+id/info" android:layout_width="450dp" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_above="@+id/alerts" android:background="@drawable/buttonchinese" android:text="edit information" /> <button android:id="@+id/alerts" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/signtoutdr" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:background="@drawable/buttonchinese" android:text="view alerts" /> <!-- <horizontalscrollview android:id="@+id/scrollview2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbarfadeduration="0" android:scrollbarsize="5dip" > --> <radiogroup android:id="@+id/radiogroup1" android:layout_width="fill_parent" android:layout_height="71dp" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:background="@drawable/bckgroundchinese" android:orientation="horizontal" > <radiobutton android:id="@+id/btnall" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:drawabletop="@drawable/navbar_allselector" android:gravity="bottom|center_horizontal" android:text="my patients" /> <radiobutton android:id="@+id/btnpicture" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginleft="5dp" android:drawabletop="@drawable/doctoricon" android:text="view assistants" /> <radiobutton android:id="@+id/btnvideo" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginleft="5dp" android:drawabletop="@drawable/records" android:text="add assistants" /> <radiobutton android:id="@+id/btnfile" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginleft="5dp" android:drawabletop="@drawable/phonebook_" android:text="add patient" /> <radiobutton android:id="@+id/btneditinfo" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginleft="5dp" android:drawabletop="@drawable/phonebook_" android:text="edit info" /> </radiogroup> <!-- </horizontalscrollview> --> </relativelayout>
you need move properties:
android:layout_alignparentbottom="true" android:layout_alignparentleft="true"
from radiogroup
horizontalscrollview
, this:
<horizontalscrollview android:id="@+id/scrollview2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:scrollbarfadeduration="0" android:scrollbarsize="5dip" > <radiogroup android:id="@+id/radiogroup1" android:layout_width="fill_parent" android:layout_height="71dp" android:background="@drawable/bckgroundchinese" android:orientation="horizontal" > <radiobutton android:id="@+id/btnall" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:drawabletop="@drawable/navbar_allselector" android:gravity="bottom|center_horizontal" android:text="my patients" /> <radiobutton android:id="@+id/btnpicture" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginleft="5dp" android:drawabletop="@drawable/doctoricon" android:text="view assistants" /> <radiobutton android:id="@+id/btnvideo" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginleft="5dp" android:drawabletop="@drawable/records" android:text="add assistants" /> <radiobutton android:id="@+id/btnfile" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginleft="5dp" android:drawabletop="@drawable/phonebook_" android:text="add patient" /> <radiobutton android:id="@+id/btneditinfo" style="@style/navbar_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginleft="5dp" android:drawabletop="@drawable/phonebook_" android:text="edit info" /> </radiogroup>
Comments
Post a Comment