View image without packaging

I have an ImageView cover for this image :

<ImageView android:layout_height="wrap_content" android:layout_width="wrap_content" android:scaleType="fitStart" android:src="@drawable/oncmap"/> 

and right below it, TextView. Unfortunately, it either pushes it out of view, or out of view, depending on the screen size of the device.

http://i.imgur.com/CuVFK5P.png

http://i.imgur.com/6wzMebV.jpg

I can hack it, but it’s probably not ...

 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="16dp" android:orientation="vertical" tools:context="MapFragment"> <ImageView android:layout_height="wrap_content" android:layout_width="wrap_content" android:src="@drawable/oncmap"/> <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Neptune" style="@style/sectionHeader"/> <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="16dp" android:text="@string/info" style="@style/text"/> 

+43
java android imageview
Jan 18 '14 at 11:01
source share
1 answer

Add the following fields to ImageView:

 android:scaleType="fitXY" android:adjustViewBounds="true" 
+145
Jan 18 '14 at 11:15
source share
β€” -



All Articles