मुझे RelativeLayout
में स्क्रीन के बाहर समस्या बटन शो के साथ सामना करना पड़ रहा है। ImageView
कोई बटन दृश्यमान स्थान देने के लिए चित्र स्केल नहीं करता है।मैं स्क्रीन पर रिलेवेटलाइट कैसे फिट कर सकता हूं?
मैं क्या है:
मुझे क्या करना चाहते हैं:
कोड:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical" >
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/str"
android:textAppearance="@android:style/TextAppearance.Small"
android:textColor="?android:attr/textColorTertiary"
android:layout_centerHorizontal="true"
/>
<ru.mw.widget.DrawableImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView"
android:adjustViewBounds="true"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop"
/>
<Button
android:id="@+id/processButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/str"
android:layout_below="@+id/imageView"
android:layout_centerHorizontal="true"
/>
समस्या जब मैं स्क्रीन ओरिएंटेशन बदलने: अगर मैं लैंडस्केप मोड में सब कुछ Arun C Thomas's method का उपयोग ठीक है, लेकिन पोर्ट्रेट मोड में मैं इस (बाएं/सही किनारों से काटी छवि) है:
क्या उम्मीद है:
बटन कोandroid:layout_alignParentBottom="true"
जोड़ने के लिए
एंड्रॉयड जोड़े के बीच
ImageView
: अपने बटन को alignParentBottom, और एंड्रॉयड: alignParentTop (दोनों = true) अपने TextView करने के लिए। आप इस समय अपनी छवि दृश्य के लिए कोई सीमा निर्धारित नहीं कर रहे हैं। –