जब मेरे पास निम्न है, तो यह शीर्ष लेआउट दिखाता है जिसमें चार रंगों के साथ नीचे लेआउट क्षेत्र की तुलना में बहुत छोटा क्षेत्र होता है।एंड्रॉइड: लेआउट_वेट शुरुआती प्रश्न
http://developer.android.com/guide/topics/ui/layout-objects.html#linearlayout के अनुसार, जब आप लेआउट_वेट में अधिक जोड़ते हैं, तो इसे क्षेत्र में वृद्धि करनी चाहिए, लेकिन यह कोड में घट जाती है।
किसी भी मदद की सराहना की जाएगी।
अग्रिम धन्यवाद।
<?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">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="4">
<TextView
android:text="red"
android:gravity="center_horizontal"
android:background="#aa0000"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="3"/>
<TextView
android:text="green"
android:gravity="center_horizontal"
android:background="#00aa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"/>
<TextView
android:text="blue"
android:gravity="center_horizontal"
android:background="#0000aa"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"/>
<TextView
android:text="yellow"
android:gravity="center_horizontal"
android:background="#aaaa00"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<TextView
android:text="row one"
android:textSize="15pt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row two"
android:textSize="15pt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row three"
android:textSize="15pt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="row four"
android:textSize="15pt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
मेरा जवाब देखें और देखें कि यह मदद करता है या नहीं। यदि उत्तर पूरी तरह से प्रश्न का उत्तर देता है तो कृपया एक उत्तर चिह्नित करें। – trgraglia