I am new in android.
I want to join two EditBox into 1 EditBox.
Anyone can help me here.
Thanks in Advance.
Asked
Active
Viewed 483 times
-1

Gaurav Mehta
- 39
- 8
-
Why u want to join them its better if u create Separate EditTexts for Start and end location – Software Sainath Jul 29 '13 at 05:05
-
2You can't make two edittext into one. you need to use two edittext and design your application to look like that. – Armaan Stranger Jul 29 '13 at 05:09
2 Answers
2
Give background to a linear layout with vertical orientation and add two transparent text box in it.
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_of_big_edittext"
android:orientation="vertical" >
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_of_your_divider" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent" />
</LinearLayout>

Chirag Jain
- 1,612
- 13
- 20
1
I dont know if you are talking about the UI. But you can take the texts from the edit text by get text method. Why cant you join both the texts to a single string and use the combined string in program?

user2628845
- 130
- 2
-
I know how to add 2 strings. but i want to join two editbox shown in screen shot. – Gaurav Mehta Jul 29 '13 at 06:13