title: Android widget configuration activity
body: <p>Good day!! I have a widget, and I need to build a configuration activity with a simple spinner and a confirm button.</p>
  
  <p>I've added it in app widget provider, and the activity is being called when I add the widget to a screen. But it is crashing right after activity launching. I can't see config layout.</p>
  
  <pre><code>[Activity(Label = "TestConfig", Name = "com.test.ConfigureActivityBig")]
      [IntentFilter(new string[] { "android.appwidget.action.APPWIDGET_CONFIGURE" })]
      class ConfigureActivity: Activity
      {
          protected override void OnCreate(Bundle savedInstanceState)
          {
              base.OnCreate(savedInstanceState);
              SetResult(Result.Canceled);
              SetContentView(Resource.Layout.WidgetConfig);
  
              var spinner = (Spinner) FindViewById(Resource.Id.widgetSpinner);
              var okButton = FindViewById(Resource.Id.widgetConfigButton);
  
              var accountList = new List&lt;string&gt; {"1", "2"};
              ArrayAdapter adapter = new ArrayAdapter(this, Resource.Layout.WidgetConfig, accountList);
              spinner.Adapter = adapter;
  
              var widgetManager = AppWidgetManager.GetInstance(this);
              var configView = new RemoteViews(PackageName, Resource.Layout.MainWidgetLayout);
  
              var widgetId =Intent.GetIntExtra(AppWidgetManager.ExtraAppwidgetId, AppWidgetManager.InvalidAppwidgetId);
              if (widgetId == AppWidgetManager.InvalidAppwidgetId)
              {
                  Finish();
                  return;
              }
  
              okButton.Click += delegate
              {
                  var selectedItem = spinner.SelectedItemPosition == 0 ? "1" : "2";
  
                  configView.SetTextViewText(Resource.Id.widgetNumberLabel, selectedItem);
                  widgetManager.UpdateAppWidget(widgetId,configView);
                  Intent resultValue = new Intent();
  
                  resultValue.PutExtra(AppWidgetManager.ExtraAppwidgetId, widgetId);
                  SetResult(Result.Ok,resultValue);
                  Finish();
              };
          }        
      }
  </code></pre>
  
  <p>And here is the config Layout:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;   
      &lt;Spinner
          android:id="@+id/widgetSpinner"
          android:layout_width="248dp"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:layout_margin="10dp" /&gt;
      &lt;Button
          android:id="@+id/widgetConfigButton"
          android:layout_width="wrap_content"
          android:layout_gravity="center"
          android:layout_height="wrap_content"
          android:text="Ok"
          android:layout_margin="10dp" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>