コード例 #1
0
        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;
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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();
                }
            };
        }
コード例 #4
0
 public override Fragment GetItem(int position)
 {
     return(TestFragment.NewInstance(Content[position % Content.Length]));
 }