I have a simple table and a scrollView for scrolling the TableRow. I had also added footer the problem is that i need to know what is the size of footer so I can give the android:layout_marginBottom="<size of footerbar> to my scrollView. So how can i get the height of the layout of footer bar? please help me.
this is my footerbar code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/btnColor"
android:orientation="horizontal" >
<Button
android:id="@+id/previous"
style="@style/pagingBarBtnAttr"
android:layout_alignParentLeft="true"
android:background="@drawable/choose_color_btn"
android:drawableLeft="@drawable/previous"
android:text="Previous" />
<TextView
android:id="@+id/pageNo"
style="@style/pagingBarBtnAttr"
android:layout_centerHorizontal="true"
android:text="Page No. 1" />
<Button
android:id="@+id/next"
style="@style/pagingBarBtnAttr"
android:layout_alignParentRight="true"
android:background="@drawable/choose_color_btn"
android:drawableRight="@drawable/next"
android:text="Next" />
now as the next and previous button has a drawable so they have the drawable according to device size so the footer bar has no fixed value of its height so how can i get its height so i can supply that value to margin_bottom of scrollview. Thanks in advance..
Refer the below code
First add footer in your xml file and set its alignParentBottom to true.
Then add scrollView and set its layout_above property with the footer id