У меня есть такой макет ..
<LinearLayout android:id="@+id/LinearLayout01"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:background="#333333" android:orientation="vertical" android:layout_width="match_parent">
<ScrollView android:layout_width="match_parent" android:id="@+id/scrollView1" android:layout_height="match_parent">
<LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
<FrameLayout android:layout_width="fill_parent" android:layout_height="45dip" android:id="@+id/frameLayout1">
<EditText android:autoText="true" android:text="EditText" android:hint="@string/searchBox" android:singleLine="true" android:layout_height="fill_parent" android:id="@+id/qbox" android:layout_width="fill_parent"></EditText>
<Button android:layout_height="fill_parent" android:text="Button" android:layout_width="45dip" android:background="@drawable/search" android:layout_gravity="right" android:id="@+id/search"></Button>
</FrameLayout>
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
<LinearLayout android:id="@+id/linearLayout2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center">
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingRight="5dip" android:id="@+id/logo" android:src="@drawable/icon" android:paddingLeft="10dip"></ImageView>
</LinearLayout>
<com.app.org.HorizontialListView android:layout_width="wrap_content" android:layout_height="150dip" android:id="@+id/hlist" android:background="#FFFFFF"></com.app.org.HorizontialListView>
</LinearLayout>
<LinearLayout android:layout_width="fill_parent" android:layout_height="40dip" android:paddingLeft="15dip" android:id="@+id/buttonlist" style="@style/tabBar"></LinearLayout>
<ListView android:layout_width="fill_parent" android:background="#FFFFFF" android:id="@+id/searchresults" android:cacheColorHint="#ffffff" android:layout_height="match_parent" android:scrollbars="none"></ListView>
</LinearLayout>
</ScrollView>
</LinearLayout>
Я только что добавил ScrollView, но, похоже, заставляет весь мой макет по какой-то причине занимать примерно половину размера экрана ... кто-то получилЛюбая идея, почему?
Ниже приведена иллюстрация эффекта, добавляемого Scrollview на макет.
Layout before ScollView
|---------------------|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|---------------------|
Layout after ScollView
|---------------------|
| |
| |
| |
| |
| |
| |
| |
|---------------------|