OsmAnd/OsmAnd/res/layout/search_transport_route_item.xml
Nelson A. de Oliveira bcab94e54f Fix inefficient layout weight
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.
2013-08-03 10:42:47 -03:00

17 lines
No EOL
896 B
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="wrap_content"
android:orientation="horizontal">
<!-- <TextView android:id="@+id/distance_label" android:layout_marginLeft="5dp"
android:layout_width="80dp" android:layout_height="fill_parent" android:gravity="left"
android:textSize="20sp"/> -->
<TextView android:id="@+id/label" android:layout_weight="1" android:layout_width="0dp"
android:layout_height="wrap_content" style="@style/ListText" />
<ImageButton android:id="@+id/remove" android:layout_width="wrap_content" android:background="?attr/reset_image"
android:contentDescription="@string/default_buttons_delete"
android:paddingLeft="2dp" android:paddingRight="2dp"
android:paddingTop="2dp" android:layout_height="wrap_content" />
</LinearLayout>