Exemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.sample_contacts_activity);

            adapter = new SampleContactsAdapter(this);

            ListView lv = FindViewById<ListView>(Android.Resource.Id.List);
            lv.Adapter = adapter;
            lv.ScrollStateChanged += (sender, e) =>
            {
                Picasso picasso = Picasso.With(this);
                if (e.ScrollState == ScrollState.Idle || e.ScrollState == ScrollState.TouchScroll)
                {
                    picasso.ResumeTag(this);
                }
                else
                {
                    picasso.PauseTag(this);
                }
            };

            SupportLoaderManager.InitLoader(ContactsQuery.QueryId, null, this);
        }
Exemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.sample_contacts_activity);

            adapter = new SampleContactsAdapter(this);

            ListView lv = FindViewById <ListView>(Android.Resource.Id.List);

            lv.Adapter             = adapter;
            lv.ScrollStateChanged += (sender, e) =>
            {
                Picasso picasso = Picasso.With(this);
                if (e.ScrollState == ScrollState.Idle || e.ScrollState == ScrollState.TouchScroll)
                {
                    picasso.ResumeTag(this);
                }
                else
                {
                    picasso.PauseTag(this);
                }
            };

            SupportLoaderManager.InitLoader(ContactsQuery.QueryId, null, this);
        }