के साथ कठिनाई मैं एक एंड्रॉइड लेआउट बनाने की कोशिश कर रहा हूं: एक लंबवत रैखिकलायआउट के अंदर 3 घटक। केंद्र घटक ScrollView
है जिसमें TextView
है। जब TextView
में टेक्स्ट की एक बड़ी मात्रा (स्क्रीन पर फिट करने से अधिक) शामिल है, तो ScrollView
स्क्रीन के निचले हिस्से तक सभी तरह से बढ़ता है, स्क्रॉलबार दिखाता है, और के साथ Button
के साथ अंतिम घटक को धक्का देता है, स्क्रीन।
के अंदर TextView
के अंदर पाठ पर्याप्त छोटा है, स्क्रीन के निचले हिस्से में बटन पूरी तरह से स्थित है।
लेआउट मैं प्राप्त करने के लिए कोशिश कर रहा हूँ है:स्क्रॉलव्यू और लाइनरलायआउट
लेआउट मैं लिखा है के लिए XML है:
<?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="fill_parent">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="10dip"
android:layout_marginBottom="10dip"
android:text="Title />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
android:textColor="#FFFFFF"
android:background="#444444"
android:padding="10dip" />
</ScrollView>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<LinearLayout
android:orientation="horizontal"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button android:id="@+id/login_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:text="@string/next_button"/>
</LinearLayout>
</LinearLayout>
आप 1.6 लक्ष्य यह केवल एक एक्सएमएल के माध्यम से पारित करता है के रूप में के लिए लिख रहे हैं, इसलिए किसी भी संदर्भ से बाहर रखा जा करने के लिए इससे पहले कि यह संदर्भित है है है। 2.1+ दो पास बनाता है। – Phobos