0
我按照这个教程,工作正常。 https://developer.xamarin.com/recipes/android/controls/imageview/display_an_imageXamarin - 如何动态更改图像源?
但在我的情况下,我有200张照片。用户将在EditText中写词,点击按钮后,分别显示图片。 我如何更改下面的代码图片来源:
EditText edit = FindViewById<EditText>(Resource.Id.edtName);
button.Click += delegate
{
img.SetImageResource(Resource.Drawable.sample2);
};
其中“SAMPLE2”为edit.Text变化。 (文字写用户...)