मैं एक छोटा एंड्रॉइड ऐप विकसित कर रहा हूं, और मुझे लेआउट के साथ समस्या हो रही है, मैं अपने एक्सएमएल में त्रुटि खोजने की कोशिश कर रहा हूं, लेकिन मुझे यह नहीं मिला ...लेआउट परिभाषा। "आपको एक लेआउट_विड्थ विशेषता प्रदान करनी होगी।"
त्रुटि I 'm हो रही है "आप एक layout_width विशेषता प्रदान करना होगा", लेकिन मैं इसे किया है और यह अभी भी काम नहीं करता है ...
यहाँ मेरी एक्सएमएल फ़ाइल है:
<?xml version="1.0" encoding="utf-8"?>
<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="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="100" >
<TextView android:id="@+id/nombreEvento"
android:layout_height="fill_parent"
android:layout_weight="70"
/>
<TextView android:id="@+id/moneda"
android:layout_height="fill_parent"
android:layout_weight="10"
/>
<TextView android:id="@+id/totalEvento"
android:layout_height="wrap_content"
android:layout_weight="20"
/>
</LinearLayout>
<TextView android:id="@+id/fecha"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
का उपयोग क्या अंतर है? –
@ AlikElzin-kilaka नेस्टेड टेक्स्ट दृश्यों में layout_WEIGHT है ... लेआउट_WIDTH भी होना चाहिए। – ComeIn