Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ImageView adjustViewBounds在Xamarin.Android上无法正常工作_Android_Xamarin_Xamarin.android_Android Imageview - Fatal编程技术网

ImageView adjustViewBounds在Xamarin.Android上无法正常工作

ImageView adjustViewBounds在Xamarin.Android上无法正常工作,android,xamarin,xamarin.android,android-imageview,Android,Xamarin,Xamarin.android,Android Imageview,我在ImageView上使用adjustViewBounds属性,如: <ImageView android:id="@+id/rotImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="false" android:layout_alignParentStart="true" android:layout_alignPa

我在ImageView上使用adjustViewBounds属性,如:

<ImageView
android:id="@+id/rotImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="false"
android:layout_alignParentStart="true"
android:layout_alignParentTop="false"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:maxHeight="60dp"
android:maxWidth="60dp"
android:adjustViewBounds="true" />
我的问题是我的ImageView是空的,只是白色的。 如果删除adjustViewBounds属性,则会显示图像,但并非如我所愿


我的Xamarin版本:last stable 4.2.2.11

adjustViewBounds可能不适合您的布局。我会尝试使用scaleType,我会先尝试FIT_CENTER,但这取决于您想要实现什么。

我尝试过使用scaleType。这不是我想要的,但我必须使用一些黑客来得到我想要的谢谢!
Bitmap image = Base64Converter.Base64ToBitmap(stringimage);
imageview.SetImageBitmap(image);