Hello all,
Android.
i want set three or two EditText in single line How to do ?
thanks.
How to set two EditText in single line
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Chintan RathodRank #516 · 4.8K reputationPosted Jun 21, 2012, 2:05 AM EDT
what you need to do is, take a "vertical linear layout", inside that take another "horizontal linear layout" and put your three edit text there.
Code will be like this in layout.xml file
---------------------------------------
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_width="match_parent"
android:layout_height="match_parent" >
---------------------
Thanks
Niravkumar Vaghela38 reputationPosted Jul 23, 2012, 11:09 PM EDT
You need to have two LinearLayouts Outer and Inner. Keep android:orientation="vertical" for outer LinearLayout and android:orientation="horizontal" for inner LinearLayout. And put your controls in Inner LinearLayout.
Final Code should look like this:
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:orientation="horizontal" android:layout_width="wrap_content"
android:layout_height="wrap_content">