如何使layout_height和layout_width具有相同的大小

Luk*_*kap 5 android android-layout

我有一些分辨率为320x320的图像.

为layout_width它设置值fill_parent

但我不知道应该为此做些什么 layout_height

我想要有相同的高度和宽度.

如果我设置layout_height=wrap_content宽度比高度大两倍......

我怎样才能使某些布局变高以填充x中的所有空间,但是y尺寸与x的大小相同

Jam*_*rue 1

您是否尝试过明确设置layout_height

例如

android:layout_height="320dip"
Run Code Online (Sandbox Code Playgroud)