按钮的点击事件我到这里
#region OnClick of Account button
ImageView Account_Button = view.FindViewById<ImageView>(Resource.Id.accountbutton);
Account_Button.Click += delegate
{
//code
};
return view;
#endregion
所以我希望在容器中我想加载一个布局,请建议我怎么做?
答案 0 :(得分:0)
这是答案
#region OnClick of account button
ImageView acc_Button = view.FindViewById<ImageView>(Resource.Id.accountbutton_orange);
acc_Button.Click += delegate
{
OnClick();
};
#endregion
并致电
public void OnClick()
{
FragmentTransaction ft;
Fragment frag;
frag = new SlidingTabsFragment();
ft = FragmentManager.BeginTransaction();
ft.Replace(Resource.Id.sample_content_fragment, frag);
ft.AddToBackStack(null);
ft.Commit();
}