Skip to content Skip to sidebar Skip to footer

How To Show Textview And Edittextview On Same Line?

this is my code for show edit text view and text view on separate line how i show both on a same line please help me can anyone tell me how is possible??? how i show label Logi

Solution 1:

write below XML code into your main layout code, it will solve your problem.

<LinearLayoutandroid:layout_width="fill_parent"android:layout_height="wrap_content"android:orientation="horizontal"android:padding="10dip" ><TextViewandroid:id="@+id/mTxtView1"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_weight="1"android:text="Name" /><EditTextandroid:id="@+id/mEdttxt1"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_weight="1"android:hint="Enter Name" /></LinearLayout>

Solution 2:

Put your TextView and EditText into LinearLayout with android:orientation="horizontal" attribute

Post a Comment for "How To Show Textview And Edittextview On Same Line?"