Имеется ImageView, в котором есть картинка, но сам этот элемент очень высок и не совпадает с размером картинки, как выровнять эти элементы?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
tools:context=".ChooseMenu">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/scrollView" >
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/clothes"
android:src="@drawable/clothes"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="50dp"
android:text="ABCD"/>
</FrameLayout>
<FrameLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/food"
android:src="@drawable/food"
/>
</FrameLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
вот настолько больше
ImageView
scaleType
- возможно он вам как-то поможет.wrap_content
подразумевает, что отображение по размеру содержимого.