public static TestFragment NewInstance(string content) { var fragment = new TestFragment(); var builder = new StringBuilder(); for (var i = 0; i < 20; i++) builder.Append(content).Append(" "); builder.Remove(builder.Length -1, 1); fragment._content = builder.ToString(); return fragment; }
public static TestFragment NewInstance(string content) { var fragment = new TestFragment(); var builder = new StringBuilder(); for (var i = 0; i < 20; i++) { builder.Append(content).Append(" "); } builder.Remove(builder.Length - 1, 1); fragment._content = builder.ToString(); return(fragment); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); Button button = FindViewById <Button>(Resource.Id.MyButton); var t = new TestFragment(); button.Click += delegate { t.Show(FragmentManager, "test"); if (t.IsVisible) { t.Dismiss(); } }; }
public override Fragment GetItem(int position) { return(TestFragment.NewInstance(Content[position % Content.Length])); }