EditText не заполняет всю высоту окна. Вот код:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout android:id="@+id/LinearLayout02" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <Button android:id="@+id/bItalic" android:layout_width="wrap_content" android:layout_height="wrap_content" ></Button> <Button android:id="@+id/bBold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <Button android:id="@+id/bUnderline" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <Button android:id="@+id/bStrike" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="S" /> <Button android:id="@+id/bSub" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <Button android:id="@+id/bSup" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <ImageButton android:id="@+id/bInsertImage" android:src="@drawable/insertimage" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <ImageButton android:id="@+id/bInsertTable" android:src="@drawable/table" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> <FrameLayout android:id="@+id/FrameLayout02" android:layout_height="fill_parent" android:layout_width="fill_parent" > <TabHost android:id="@+id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingTop="62px"> <ScrollView android:id="@+id/scroll01" android:layout_width="fill_parent" android:layout_height="fill_parent"> <HorizontalScrollView android:id="@+id/scroll_hor01" android:layout_width="fill_parent" android:layout_height="fill_parent"> <EditText android:id="@+id/VisualPane" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </HorizontalScrollView> </ScrollView> <ScrollView android:id="@+id/scroll02" android:layout_width="fill_parent" android:layout_height="fill_parent"> <HorizontalScrollView android:id="@+id/scroll_hor02" android:layout_width="fill_parent" android:layout_height="fill_parent"> <EditText android:id="@+id/HTMLPane" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </HorizontalScrollView> </ScrollView> </FrameLayout> </TabHost> </FrameLayout> </LinearLayout>
Вот скриншот:
Почему EditText не заполняет всю высоту окна?
Ширина HorizontalScrollView - это максимальная ширина его элементов, поэтому вы не можете использовать заполнение родителя внутри, потому что ширина родителя не определена, поэтому она будет равна 0. То, что вы ищете - я думаю, - этоandroid: scrollHorizontally атрибут EditText.По умолчанию он прокручивается по умолчанию (если его размер превышает изображение), поэтому не следует размещать его внутри каких-либо ScrollViews.Просто используйте EditText с заполнением родительских размеров и с scrollHorizontally = "true".Также убедитесь, что LinearLayout, содержащий его, также имеет родительскую высоту заливки.
Родитель LinearLayout свойство
android:layout_height="wrap_content"
должно быть
android:layout_height="fill_parent"
Вы можете установить следующее свойство EditText view
EditText
android:layout_margin="1dip"
Это что-то вроде хака, но пока будет работать.
Установка следующих свойств помогла мне изменить размер: андроид: MinHeight = "105px" андроид: layout_height = "115px" android: layout_width = "250px"