I have a linear layout that contains an image and another linear layout that is the bottom pane on the screen. I am using the bottom panel elsewhere in my project and I don't think this is a problem.
The problem is that the image is viewing the entire screen. The image itself does not, but it does. I can not understand this. As you can see in my xml, I do not use fill_parent for the image, and I tried every possible type of scaleType for the image.
Any suggestions? Also, if that helps, I create Android API 8
Edit: I changed the xml below so that you can use exactly what I wrote. (This is the image I use in the image view: http://i.imgur.com/qN5aT.jpg )
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="#FFFFFF" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitStart" android:src="@drawable/quote_sample_img" /> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="bottom" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="This is text" /> </LinearLayout> </LinearLayout>
http://i.imgur.com/m3msH.png (Sorry, not enough reputation to post the actual image)
android android-layout android-imageview imageview
amc6
source share