Подтвердить что ты не робот

Просмотр изображения без упаковки

У меня есть обложка ImageView этого изображения:

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

и прямо под ним, TextView. К сожалению, он либо выталкивает его из вида, либо из вида в зависимости от размера экрана устройства.

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

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

Я могу "взломать" его, но это скорее не...

<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"/>

4b9b3361

Ответ 1

Добавьте в ImageView следующие поля:

android:scaleType="fitXY"
android:adjustViewBounds="true"