public static BasicBrowseQuestionsFragment NewInstance() { var fragment = new BasicBrowseQuestionsFragment { Arguments = new Bundle() }; return(fragment); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); View view = inflater.Inflate(Resource.Layout.basic_fragment_QA, null); Activity.Title = "Opportunities"; browse = view.FindViewById <Button>(Resource.Id.browse); ask = view.FindViewById <Button>(Resource.Id.ask); browse.Click += (sender, e) => { FragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, BasicBrowseQuestionsFragment.NewInstance()) .AddToBackStack(null).Commit(); }; ask.Click += (sender, e) => { FragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, BasicAskQuestionFragment.NewInstance()) .AddToBackStack(null).Commit(); }; return(view); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); View view = inflater.Inflate(Resource.Layout.basic_fragment_first_view, null); Activity.Title = "Home"; ViewModel = new SettingsViewModel(); giveHelp = view.FindViewById <Button>(Resource.Id.give_help); getHelp = view.FindViewById <Button>(Resource.Id.get_help); superHumans = view.FindViewById <Button>(Resource.Id.superhumans); giveHelp.Click += (sender, e) => { FragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, BasicBrowseQuestionsFragment.NewInstance()) .AddToBackStack(null).Commit(); }; giveHelp.LongClick += (sender, e) => { ((BasicMainActivity)Activity).Speak("Give Help"); }; getHelp.Click += (sender, e) => { FragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, BasicGetHelpFragment.NewInstance()) .AddToBackStack(null).Commit(); }; getHelp.LongClick += (sender, e) => { ((BasicMainActivity)Activity).Speak("Get Help"); }; superHumans.Click += (sender, e) => { FragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, BasicBrowseUsersFragment.NewInstance()) .AddToBackStack(null).Commit(); }; superHumans.LongClick += (sender, e) => { ((BasicMainActivity)Activity).Speak("Superhumans"); }; return(view); }