1

How to set up a layout for EditText and Button aligned by the topline?

view story
linux-howto

http://stackoverflow.com – I'm trying to create a kind of "Buttoned Edit" control, when EditText and Button controls are placed in the same line. I used a simple LinearLayout: <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" > <EditText android:id="@+id/editTextFileName" android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:ems="10" android:hint="Database file name" android:inputType="textUri" /> <Button android:id="@+id/buttonFileSelect" (HowTos)