我试图显示从外部卡加载到占据整个屏幕的图像视图的位图。我的目标是显示它在Gallery应用中的显示方式。我在版面xml中尝试使用scaletype="center"
,scaletype="fitXY"
,有和没有adjustViewBounds="true"
。在imageview中以全尺寸显示位图
我的XML是这样的
<ImageView
android:layout_width="wrap_content"
android:adjustViewBounds="false"
android:scaleType="center"
android:layout_centerInParent="true"
android:layout_height="wrap_content"
android:id="@+id/player_imageview" />
任何帮助将不胜感激。谢谢。
你试过match_parent? – XxGoliathusxX
是的,我有。如果我添加“match_parent”,imageview将占据整个屏幕。我不想那样。我希望它只占用源位图的大小。 –