I was working on an android wallpaper app in visual studio and got this error mentioned above. I included Gallery and some ImageAdapter code from xamarin website here is the link https://developer.xamarin.com/guides/android/user_interface/gallery/. when i finally compile, It says Gallary is obsolete in my mainactivity.cs file.
namespace wallpaperApp
{
[Activity(Label = "wallpaperApp", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
Gallery gallery = (Gallery)FindViewById<Gallery>(Resource.Id.gallery);
gallery.Adapter = new ImageAdapter(this);
gallery.ItemClick += delegate (object sender, Android.Widget.AdapterView.ItemClickEventArgs args) {
Toast.MakeText(this, args.Position.ToString(), ToastLength.Short).Show();
};
}
}
}