bcab94e54f
When only a single widget in a LinearLayout defines a weight, it is more efficient to assign a width/height of 0dp to it since it will absorb all the remaining space anyway. With a declared width/height of 0dp it does not have to measure its own size first.
47 lines
No EOL
1.5 KiB
XML
47 lines
No EOL
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="fill_parent"
|
|
android:orientation="vertical" >
|
|
|
|
<LinearLayout
|
|
android:id="@+id/LinearLayout"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginRight="5dp"
|
|
android:layout_marginTop="5dp" >
|
|
|
|
<ProgressBar
|
|
android:id="@+id/ProgressBar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="invisible">
|
|
</ProgressBar>
|
|
|
|
<EditText
|
|
android:id="@+id/SearchText"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:hint="@string/hint_search_online"
|
|
android:text="" >
|
|
</EditText>
|
|
|
|
<Button
|
|
android:id="@+id/SearchButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:minWidth="80dp"
|
|
android:text="@string/search_button" >
|
|
</Button>
|
|
</LinearLayout>
|
|
|
|
<ListView
|
|
android:id="@android:id/list"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
style="@style/OsmandListView">
|
|
</ListView>
|
|
|
|
</LinearLayout> |