Example #1
0
        private void SetupRecipesList()
        {
            _suggestedRecipesList = FindViewById <MvxRecyclerView>(Resource.Id.recipes_list);
            var adapter = new MvxRecyclerAdapter((IMvxAndroidBindingContext)BindingContext);

            adapter.ItemTemplateSelector = new MvxDefaultTemplateSelector(Resource.Layout.recipe_item);
            _suggestedRecipesList.SetAdapter(adapter);
        }
Example #2
0
        private void SetupList(View view)
        {
            _matchRecipeList = view.FindViewById <MvxRecyclerView>(Resource.Id.chosen_food_list);
            var adapter = new MvxRecyclerAdapter((IMvxAndroidBindingContext)BindingContext);

            adapter.ItemTemplateSelector = new MvxDefaultTemplateSelector(Resource.Layout.matched_food_item);
            _matchRecipeList.SetAdapter(adapter);
        }
Example #3
0
 private void SetupResultsList()
 {
     _searchResultsList    = FindViewById <MvxRecyclerView>(Resource.Id.search_results_list);
     _searchResultsAdapter = new MvxRecyclerAdapter((IMvxAndroidBindingContext)BindingContext);
     _searchResultsAdapter.ItemTemplateSelector = new MvxDefaultTemplateSelector(Resource.Layout.food_item);
     _searchResultsList.SetAdapter(_searchResultsAdapter);
     _searchResultsList.SetLayoutManager(new LinearLayoutManager(this));
 }
Example #4
0
        private void SetupList(View view)
        {
            _settingsList = view.FindViewById <MvxRecyclerView>(Resource.Id.single_list);
            var adapter = new MvxRecyclerAdapter((IMvxAndroidBindingContext)BindingContext);

            adapter.ItemTemplateSelector = new MvxDefaultTemplateSelector(Resource.Layout.settings_item);
            _settingsList.SetAdapter(adapter);
        }
Example #5
0
        private void InitData()
        {
            var adapter = new PhotoAdapter((IMvxAndroidBindingContext)BindingContext);

            _photos.SetLayoutManager(new LinearLayoutManager(Activity));
            _photos.HasFixedSize = true;
            _photos.SetAdapter(adapter);
        }
Example #6
0
        private void SetupRecipeList()
        {
            _recipeDetailList = FindViewById <MvxRecyclerView>(Resource.Id.recipes_list);
            var adapter = new RecipeDetailAdapter(ViewModel, (IMvxAndroidBindingContext)BindingContext);

            adapter.ItemTemplateSelector = new RecipeDetailTemplateSelector();
            _recipeDetailList.SetAdapter(adapter);
        }
Example #7
0
        private void InitData()
        {
            var adapter = new UserAdapter((IMvxAndroidBindingContext)BindingContext);

            adapter.SetOnItemClickListener(this);
            _recycleView.SetLayoutManager(new LinearLayoutManager(Activity));
            _recycleView.HasFixedSize = true;
            _recycleView.SetAdapter(adapter);
        }
 private void DeletePoster(LocalPosterModel poster)
 {
     ViewModel.Poster = poster;
     ViewModel.DeletePosterCommand.Execute();
     adapter.NotifyDataSetChanged();
     _galleryCollection.SetAdapter(adapter);
     if (ViewModel.Progress == 0)
     {
         statusText.Text = "Add Photo";
         btnSubmit.SetTextColor(Android.Graphics.Color.LightGray);
     }
 }
Example #9
0
        private void InitData()
        {
            var adapter = new UserAdapter((IMvxAndroidBindingContext)BindingContext);

            adapter.SetOnItemClickListener(this);
            _recycleView.SetLayoutManager(new LinearLayoutManager(Activity));
            _recycleView.HasFixedSize = true;
            _recycleView.SetAdapter(adapter);

            var drawable = AppCompatResources.GetDrawable(Activity, Resource.Drawable.circle_drawable);

            if (drawable != null)
            {
                drawable.SetColorFilter(GetColor(ViewModel.StatusColor), PorterDuff.Mode.SrcAtop);
                _circleView.Background = drawable;
            }
        }