मेरे पास क्षैतिज अभिविन्यास और 2 छवि दृश्य में एक रैखिक लयआउट है और मैं छवियों को चौड़ाई पर 50% स्क्रीन भरना चाहता हूं, प्रत्येक सेलफोन या टेबलेट में अलग आकार के साथ काम करने के लिए।चौड़ाई के लिए 50% कैसे रखें
कुछ इस तरह:
+-------------+
|_____________|
| | |
| 50% | 50% |
| | |
|-------------|
| |
+-------------+
बेस्ट अब तक:
<?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="fill_parent"
android:gravity="center"
android:orientation="horizontal" >
<ImageView
android:id="@+id/logo_c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_animado" />
<ImageView
android:id="@+id/logo_t"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/logo_animado2" />
</LinearLayout>
प्रत्येक imageView 'एंड्रॉयड होना चाहिए: layout_width =" 0dp "' और 'androdi: layout_weight =" 1 "' –
एंड्रॉइड का प्रयोग करें: layout_weight = ""। – user1744952
Thx @ शेरिफेलखतिब मेरी समस्या हल करें = डीडी। –