मैं measureWithLargestChild="true"
विकल्प के साथ खेल रहा हूं। मुझे समझ में नहीं आता कि मेरा लेआउट कुल क्यों टूटता है, अगर मेरे बटन में से एक पर बहुत बड़ा टेक्स्ट है। मुझे लगता है कि इसे 1/3 के मूल आकार को रखना चाहिए लेकिन वे 1/6 के बारे में छोटे हो जाते हैं। ऐसा क्यों है?माप को समझनाथथर्जेस्ट चाइल्ड: लेआउट क्यों तोड़ता है?
यहाँ मेरी xml है:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:baselineAligned="false"
android:gravity="center"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:measureWithLargestChild="true" >
<Button
style="@style/my_style"
android:layout_weight="1"
android:text="Button123456" />
<Button
style="@style/my_style"
android:layout_weight="1"
android:text="A" />
<Button
style="@style/my_style"
android:layout_weight="1"
android:text="WW" />
</LinearLayout>
</LinearLayout>
क्या कोई यह बता सकता है कि यह 2 (4 मामलों में से) में क्यों छोटा हो गया है। इस मामले में कोई जगह उपलब्ध नहीं है? – Diffy