संपादित करें: मुझे विश्वास है कि यह आपकी समस्या का समाधान करेगा। नीचे कोड देखें। मुझे बताएं क्या इससे मदद मिलती है! मुझे पता है कि इससे मेरी मदद मिली है और मैं इसका इस्तेमाल करूँगा। अगर यह काम करता है तो इसे उत्तर के रूप में स्वीकार करें! =)
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1">
<TableRow>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="button1"
android:id="@+id/button1button"></Button>
<EditText
android:layout_height="wrap_content"
android:id="@+id/firstedittext"
android:layout_width="wrap_content"></EditText>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="button2"
android:id="@+id/button2button"></Button>
</TableRow>
</TableLayout>
संपादित करें: जोड़ा रिश्तेदार लेआउट देखने के लिए कि यह आप के लिए काम करता है, मुझे पता है अगर यह काम करता है। वांछित दूरी प्राप्त करने के लिए आपको "10px" समायोजित करने की आवश्यकता होगी। मैं देख रहा हूं कि ऐसा करने का एक बेहतर तरीका है, जहां दूरी अधिक गतिशील है।
स्क्रीन के दाएं और बाएं किनारे के साथ संरेखित करने के लिए आप बटन "alignParentLeft" और "alignParentRight" बना सकते हैं। हालांकि, मुझे अभी भी दो विचारों के बीच पाठ प्राप्त करने में परेशानी हो रही है।
आप इसे लेआउट के लिए अपनी एक्सएमएल फ़ाइल में कर सकते हैं। इसे एक क्षैतिज लेआउट बनाएं और पहले बटन को पहले जोड़ें, फिर टेक्स्ट व्यू, फिर दूसरा बटन। उदाहरण के लिए जल्द ही एक्सएमएल पोस्ट करेगा।
<RelativeLayout
android:id="@+id/LinearLayout01"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="button1"
android:layout_alignParentLeft="true"
android:layout_marginRight="10px"
android:id="@+id/button1button"></Button>
<EditText
android:layout_height="wrap_content"
android:id="@+id/firstedittext"
android:layout_toRightOf="@id/button1button"
android:layout_marginRight="10px"
android:layout_width="wrap_content"></EditText>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/firstedittext"
android:text="button2"
android:id="@+id/button2button"></Button>
</RelativeLayout>
यदि आप हमें अब तक कोड दिखाते हैं, तो आपकी मदद करना आसान होगा। – Phonon