public override void OnActivityCreated(Bundle p0)
            {
                base.OnActivityCreated(p0);

                // Give some text to display if there is no data.  In a real
                // application this would come from a resource.
                SetEmptyText("No phone numbers");

                // We have a menu item to show in action bar.
                HasOptionsMenu = true;

                // Create an empty adapter we will use to display the loaded data.
                _adapter = new SimpleCursorAdapter(Activity,
                                                   Android.Resource.Layout.SimpleListItem1, null,
                                                   new string[] { Android.Provider.Contacts.People.InterfaceConsts.DisplayName },
                                                   new int[] { Android.Resource.Id.Text1 });

                ListAdapter = _adapter;

                // Start out with a progress indicator.
                SetListShown(false);


                // Prepare the loader.  Either re-connect with an existing one,
                // or start a new one.
                LoaderManager.InitLoader(0, null, this);
            }
Exemple #2
0
        public virtual void Load(Album target)
        {
            Bundle args = new Bundle();

            args.PutParcelable(ARGS_ALBUM, target);
            mLoaderManager.InitLoader(LOADER_ID, args, this);
        }
Exemple #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            // return inflater.Inflate(Resource.Layout.YourFragment, container, false);

            View view = inflater.Inflate(Resource.Layout.MainUserListFragment, container, false);

            User user = ((MainUserActivity)Activity).LoggedIn;

            UserCollection = DBHandler.Instance.GetUserCollection(user.ID);

            TextView listNameText = view.FindViewById <TextView>(Resource.Id.listNameText);

            listNameText.Text = UserCollection[0].Name;

            collectionItemRecyclerAdapter            = new CollectionItemRecyclerAdapter();
            collectionItemRecyclerAdapter.ItemClick += OnListClicked;

            RecyclerView        collectionList = view.FindViewById <RecyclerView>(Resource.Id.collectionItemRecyclerView);
            LinearLayoutManager layout         = new LinearLayoutManager(Activity);

            collectionList.SetLayoutManager(layout);
            collectionList.SetAdapter(collectionItemRecyclerAdapter);

            LoaderManager.InitLoader(COLLECTIONITEMLIST_LOADER_ID, null, this);

            return(view);
        }
Exemple #4
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            // return inflater.Inflate(Resource.Layout.YourFragment, container, false);

            View view = inflater.Inflate(Resource.Layout.MainUserFeedFragment, container, false);

            nowShowingAdapter = new NowShowingListAdapter(Activity);
            ListView nowShowingList = view.FindViewById <ListView>(Resource.Id.nowShowingListView);

            nowShowingList.Adapter    = nowShowingAdapter;
            nowShowingList.ItemClick += OnListClicked;

            SetupListViews(nowShowingList);

            comingSoonAdapter = new ComingSoonListAdapter(Activity);
            ListView comingSoonList = view.FindViewById <ListView>(Resource.Id.comingSoonListView);

            comingSoonList.Adapter    = comingSoonAdapter;
            comingSoonList.ItemClick += OnListClicked;

            SetupListViews(comingSoonList);

            LoaderManager.InitLoader(NOWSHOWING_LOADER_ID, null, this);
            LoaderManager.InitLoader(COMINGSOON_LOADER_ID, null, this);

            return(view);
        }
Exemple #5
0
        private void PopulateAutoComplete()
        {
            if (!MayRequestContacts())
            {
                return;
            }

            LoaderManager.InitLoader(0, null, this);
        }
Exemple #6
0
            public override void OnActivityCreated(Bundle p0)
            {
                base.OnActivityCreated(p0);

                HasOptionsMenu = true;

                _adapter = new SimpleCursorAdapter(Activity,
                                                   Android.Resource.Layout.SimpleListItem1, null,
                                                   new string[] { Android.Provider.Contacts.People.InterfaceConsts.DisplayName },
                                                   new int[] { Android.Resource.Id.Text1 });

                LoaderManager.InitLoader(0, null, this);
            }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            // Store a clean environment.
            EnvironmentBackup = EnvironmentBackup ?? System.Environment.GetEnvironmentVariables();

            SetTheme(Resource.Style.AppTheme);
            base.OnCreate(savedInstanceState);
            ViewGroup root = FindViewById <ViewGroup>(Android.Resource.Id.Content);

            SetContentView(Resource.Layout.MainLayout);

            MainToolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.MainToolbar);
            SetSupportActionBar(MainToolbar);
            MainToolbar.SetLogo(Resource.Drawable.InAppLogo);
            SupportActionBar.Title = SupportActionBar.Title.Substring(3);

            FindViewById <TextView>(Resource.Id.MainWarning).ApplyHTML();

            MainFABRefresh        = FindViewById <FloatingActionButton>(Resource.Id.MainFABRefresh);
            MainFABRefresh.Click += (s, e) =>
            {
                LoaderManager.RestartLoader(0, null, this);
            };

            MainListView = FindViewById <ListView>(Resource.Id.MainListView);

            FrameLayout.LayoutParams layoutParams;

            ProgressBar progress = new ProgressBar(this);

            layoutParams = new FrameLayout.LayoutParams(
                ViewGroup.LayoutParams.WrapContent,
                ViewGroup.LayoutParams.WrapContent,
                GravityFlags.CenterHorizontal | GravityFlags.CenterVertical
                );
            progress.LayoutParameters = layoutParams;
            progress.Indeterminate    = true;
            MainListView.EmptyView    = progress;
            root.AddView(progress);

            MainListAdapter      = new GameInfoListAdapter(this);
            MainListView.Adapter = MainListAdapter;
            LoaderManager.InitLoader(0, null, this);

            MainListView.ItemClick += (s, e) => OpenGamePlay((GameInfo)MainListView.GetItemAtPosition(e.Position));
            RegisterForContextMenu(MainListView);
        }
Exemple #8
0
        public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)
        {
            if (requestCode == PermissionHandler.REQUEST_CONTACTS)
            {
                Log.Info(TAG, "Received response for contact permissions request.");

                if (PermissionUtil.VerifyPermissions(grantResults))
                {
                    LoaderManager.InitLoader(0, null, this);
                    //All required permissions have been granted, display contacts fragment.
                    //Snackbar.Make(layout, Resource.String.permision_available_contacts, Snackbar.LengthShort).Show();
                }
                else
                {
                    Log.Info(TAG, "Contacts permissions were NOT granted.");
                    //Snackbar.Make(layout, Resource.String.permissions_not_granted, Snackbar.LengthShort).Show();
                }
            }
            else
            {
                base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
            }
        }
 private void LoadVideoData()
 {
     VideoProvider.mContext = this.Activity;
     mVideosUrl             = this.Activity.Resources.GetString(Resource.String.catalog_url);
     LoaderManager.InitLoader(0, null, this);
 }
Exemple #10
0
        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            LoaderManager.InitLoader(ForecastLoader, null, this);

            base.OnActivityCreated(savedInstanceState);
        }