Пример #1
0
            public void Bind(int position)
            {
                ItemView.SetBackgroundColor(new Android.Graphics.Color((int)Colors.Values[position % Colors.Values.Length]));
                ItemView.SetOnClickListener(new ClickListener(position));

                SpinStyle style    = SpinStyle.Values()[position & 15];
                Sprite    drawable = SpriteFactory.Create(style);

                _spinKitView.SetIndeterminateDrawable(drawable);
            }
Пример #2
0
            public override Object InstantiateItem(ViewGroup container, int position)
            {
                var view = LayoutInflater.From(container.Context).Inflate(Resource.Layout.item_pager, null);

                SpinKitView spinKitView = view.FindViewById <SpinKitView>(Resource.Id.spin_kit);
                var         name        = view.FindViewById <TextView>(Resource.Id.name);
                var         style       = SpinStyle.Values()[position];

                name.Text = style.Name().ToLower();
                var drawable = SpriteFactory.Create(style);

                spinKitView.SetIndeterminateDrawable(drawable);
                container.AddView(view);

                return(view);
            }