私が持っているもの: ScrollView
、その中に
LinearLayout
( orientation="vertical",
layout_width="match_parent",
layout_height="wrap_content"
)、
その中
ImageView
( layout_width="match_parent",
layout_height="wrap_content"
) と
TextView
.
私が欲しいもの: ImageView
縦横比と数学の親の幅、および下のテキストを保持する必要がありますImageView
。
ImageView params
:adjustViewBounds true/false
と allscaleType
のさまざまな組み合わせを使用しましたが、必要なものを取得できません:
- scaleType centerCrop を使用する場合 - 画像がトリミングされている場合は上部と下部。
- scaleType center - 左右に空きスペースを使用する場合
- scaleType fitXY を使用すると、画像の縦横比が維持されません
画像の高さを高くすることはできません。どうすれば修正できますか?