I created a custom dialog and I\'d like to start a new activity when OK is clicked. How can I get the context to set it as first argument of my Intent constructor?
I
If you are working on a DialogFragment you can do it that way:
public class MyDialogFragment : DialogFragment
{
private Context _Context;
...
public override void OnActivityCreated(Bundle savedInstanceState)
{
_Context = Context;
...
alertDialog.SetButton("Start Activity Button", delegate
{
var uri = Android.Net.Uri.Parse("https://.....");
var intent = new Intent(Intent.ActionView, uri);
_Context.StartActivity(intent);