Inheritance: Android.App.Activity
示例#1
0
        public void ItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            Intent intent = new Intent();

            // initialize the intent based on user click
            switch (e.Position)
            {
            case 0:
                AutoCompleteActivity autoActivity = new AutoCompleteActivity();
                intent = new Intent(ApplicationContext, autoActivity.Class);
                break;

            case 1:
                ComboBoxActivity comActivity = new ComboBoxActivity();
                intent = new Intent(ApplicationContext, comActivity.Class);
                break;

            case 2:
                DropDownActivity dropDownActivity = new DropDownActivity();
                intent = new Intent(ApplicationContext, dropDownActivity.Class);
                break;

            case 3:
                MaskActivity maskActivity = new MaskActivity();
                intent = new Intent(ApplicationContext, maskActivity.Class);
                break;
            }
            // start the new activity
            StartActivity(intent);
        }
        public void ItemClick(object sender, AdapterView.ItemClickEventArgs e)
	   {
		    Intent intent = new Intent();
		    // initialize the intent based on user click
		    switch (e.Position)
		    {
                case 0:
                    AutoCompleteActivity autoActivity = new AutoCompleteActivity();
                    intent = new Intent(ApplicationContext, autoActivity.Class);
                    break;
                case 1:
                    ComboBoxActivity comActivity = new ComboBoxActivity();
                    intent = new Intent(ApplicationContext, comActivity.Class);
                    break;
                case 2:
                    DropDownActivity dropDownActivity = new DropDownActivity();
                    intent = new Intent(ApplicationContext, dropDownActivity.Class);
                    break;
                case 3:
                    MaskActivity maskActivity = new MaskActivity();
                    intent = new Intent(ApplicationContext, maskActivity.Class);
                    break;
		    }
		    // start the new activity
		    StartActivity(intent);
        }