的框我一直在試圖弄清楚如何放置一個容器,該容器在下面的內容的ScrollView中垂直填充整個屏幕。Android:填充整個屏幕的內容低於
事情是這樣的:
- [BOX填充整個屏幕]
- [一些其他的東西,/需要滾動查看]
這是內容我想下面盒子: http://myupload.dk/handleupload/ce34836ostt
我試過了一切 - 看起來像我ca不是將絕對位置填充到填充整個屏幕的容器。我可以製作一個填滿整個屏幕的盒子,但是我在它下面添加的所有東西都會將盒子擠在一起。
它工作時,我的尺寸添加到框,就像這樣:
<com.github.ksoichiro.android.observablescrollview.ObservableScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:minWidth="25px"
android:minHeight="0px"
android:paddingTop="0dp"
android:fillViewport="true"
android:id="@+id/scroll">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- THIS BOX I WOULD LIKE TO FIT THE ENTIRE SCREEN -->
<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="100dp"
android:id="@+id/cardsPager" />
<!-- THIS CONTENT SHOULD BE BELOW THE BOX ABOVE -->
<fragment android:name="bonnier.hvadsynes.fragments.DetailsFragment"
android:id="@+id/details_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</com.github.ksoichiro.android.observablescrollview.ObservableScrollView>
非常感謝您的幫助!
- 西蒙
真的很好,乾淨的方式來做到這一點,也明白你用我的模板的例子 - 感謝分享,並花時間迴應... –