无法从旧片段启动“新活动”?单击按钮无济于事

时间:2018-11-03 09:14:13

标签: c# android visual-studio xamarin xamarin.android

On Fragment : 


 public override void OnViewCreated(View view, Bundle savedInstanceState)
            {           
                buttonRedirect = View.FindViewById<Button>(Resource.Id.send);
                buttonRedirect.Click += BtnOption_Click;
            }

    private void BtnOption_Click(object sender, EventArgs e)
            {                        
                string imageString = "Some Data I am sending"
                StartNewActivity();
            }
    private void StartNewActivity()
            {
                Intent intent = new Intent(this.Activity, 
                typeof(New Activity Page));
                intent.PutExtra("ImageString", imageString);
                StartActivity(intent);
            }

我是Xamarin android的初学者,但无法对此进行解码。按下按钮时,调试器将进入StartNewActivity(),但什么也没做..

0 个答案:

没有答案