मैं एक वीडियो शीर्षक और टैग प्रदर्शित करने के लिए एक संवाद बनाना चाहता हूं। पाठ के नीचे मैं बटन जोड़ना, संपादित करना और हटाना चाहता हूं और इन तत्वों को एक ही आकार में बनाना चाहता हूं। क्या किसी को भी LinearView के अंदर तत्व बनाने के लिए .xml लेआउट फ़ाइल को संशोधित करने का तरीका पता है?एंड्रॉइड: सभी तत्वों को LinearLayout के अंदर समान आकार कैसे बनाएं?
वर्तमान लेआउट फ़ाइल इस तरह दिखता है:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtTitle" android:text="[Title]" >
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtTags"
android:text="[Tags]" >
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnPlay"
android:text="View">
</Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnEdit"
android:text="Edit">
</Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnDelete"
android:text="Delete">
</Button>
</LinearLayout>
</LinearLayout>
मैं अगर किसी को भी चिपकाया फ़ाइल सामग्री को संशोधित करके समाधान दिखा सकता है की सराहना करेंगे।
धन्यवाद!
यदि आप _REALLY_ चाहते थे कि आप वैकल्पिक रूप से एंड्रॉइड के साथ टेबललेआउट का उपयोग कर सकें: stretchColumns = "0,1,2"। –
बहुत बढ़िया ... तो इसका मतलब है, अगर हम 0px के रूप में चौड़ाई डालते हैं, तो वजन सेटिंग्स को ओवरराइड कर देगा? ऐसा क्यों है? – noob
यह सिर्फ सही काम किया। – Proverbio