मेरे पास एक लंबवत रैखिकरण है जो एक निश्चित सीमा से आगे नहीं बढ़ेगा।क्या LinearLayout की अधिकतम ऊंचाई है?
यह imageView http://tinypic.com/r/20nm6s/5
में centerCrop साथ लेआउट है यह कोई फसल सेट के साथ लेआउट है (इसलिए यह पूरी चौड़ाई और विशाल होना चाहिए) http://tinypic.com/r/vzk7kw/5
तो मेरे विचार कर रहा है है कि वहाँ कुछ अंतर्निहित अधिकतम ऊंचाई जो मैं अपने लेआउट में नहीं देख रहा हूं लेकिन मैं नहीं देख सकता कि यह कहां है, क्या आप मेरी त्रुटि खोज सकते हैं?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/dropshadow"
>
<TextView
android:id="@+id/heading"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
/>
<ImageView
android:id="@+id/featuredimage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:maxHeight="1000dp"
android:scaleType="centerCrop"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
/>
</LinearLayout>
</RelativeLayout>
आपके पोस्ट कोड में LinearLayout का उपयोग करने का कोई मतलब नहीं है। आप सापेक्ष लेआउट का उपयोग करके इसे प्राप्त करने में सक्षम हो सकते हैं। – dcanh121
छवि के वास्तविक पिक्सेल आयाम क्या हैं? क्या आप उस कोड को पोस्ट कर सकते हैं जो छवि लोड करता है और सेट करता है? –
मुझे 'maxHeight'' को स्क्रॉलव्यू 'प्रदान करने का समाधान मिला है। उस समाधान का उपयोग किसी भी प्रकार के दृश्य के लिए भी किया जा सकता है। कृपया http://chintanrathod.com/maxheightscrollview-in-android-using-android-studio/ –