layout problam in android
Posted
by
mahdi
on Stack Overflow
See other posts from Stack Overflow
or by mahdi
Published on 2011-01-16T11:38:43Z
Indexed on
2011/01/16
11:53 UTC
Read the original article
Hit count: 460
Hi i try show layout like image 1 (textView and editText in same line) but my out put shown like image 2 ! i try with this code :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5px"
>
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="URL:"
android:layout_alignBaseline="@+id/entry"
android:layout_alignParentLeft="true"/>
/>
<EditText
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/label"
android:layout_alignParentTop="true"
/>
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingRight="30px"
android:paddingLeft="30px"
android:text="Go..."
/>
</LinearLayout>
please help me thanks
© Stack Overflow or respective owner