Android imageView比parrent大

Android imageView比parrent大,android,android-layout,Android,Android Layout,我需要一些设计布局的帮助。我正试图设计这样的东西: 我的问题是,在某些设备上(宽度非常小),图像视图太大,不可见。我的目标是将带有两个相等列和ImageView的设计转化为。imageView的最大宽度可以为列(无填充)。可能应该缩放到最大允许大小。我尝试过使用scaleType连接GridLayout和TableLayout,但是ImagesView总是比column大 有人知道我怎样才能达到类似的效果吗 致以最良好的祝愿, Adrian您是否尝试查看imageView.AdjustView

我需要一些设计布局的帮助。我正试图设计这样的东西:

我的问题是,在某些设备上(宽度非常小),图像视图太大,不可见。我的目标是将带有两个相等列和ImageView的设计转化为。imageView的最大宽度可以为列(无填充)。可能应该缩放到最大允许大小。我尝试过使用scaleType连接GridLayout和TableLayout,但是ImagesView总是比column大

有人知道我怎样才能达到类似的效果吗

致以最良好的祝愿,
Adrian

您是否尝试查看imageView.AdjustViewBounds(true)

我找到了一个解决方案:)



谢谢,并致以最诚挚的问候。

是的,我有,图像视图更大,那么图像真的很大吗?如果没有包装内容,那么使用线性布局(水平方向),然后在内部添加线性布局(列)垂直方向,然后在内部添加图像视图。这有意义吗?您可以将两种布局的内部线性布局都设置为layout_width=1
<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/awards_status"
        android:orientation="horizontal">
        <LinearLayout
            android:layout_below="@+id/awards_status"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:layout_weight=".5">
            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:src="@drawable/awards_one_dwarf" />
        </LinearLayout>
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_below="@+id/awards_status"
            android:orientation="vertical"
            android:layout_weight=".5">
            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:src="@drawable/awards_one_dwarf" />
        </LinearLayout>
    </LinearLayout>