我有一個簡單的表格和一個用於滾動TableRow
的scrollView
。我還添加了頁腳,問題是我需要知道頁腳的大小,所以我可以將android:layout_marginBottom="<size of footerbar>
添加到我的scrollView中。那麼我怎樣才能得到頁腳欄佈局的高度呢?請幫幫我。獲取具有wrap_content屬性的佈局的高度
這是我footerbar代碼:
<?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" />
現在作爲一個和上一個按鈕有一個可繪製,使他們有提拉根據設備尺寸,以便頁腳欄具有不固定值的身高,所以我怎麼能得到它的身高,所以我可以提供margin_bottom
的價值。在此先感謝..
u能張貼什麼ü做了設置其layout_above財產爲頁腳? – AkashG