void GetCategoryView() { _categoriesList = new List <CategoriesListData>(); _categoriesListView = FindViewById <ListView>(Resource.Id.categorieslistView); _categoriesshadowImageView = FindViewById <ImageView>(Resource.Id.categoriesListDownShadowImageView); _categoriesListView.Visibility = ViewStates.Gone; _categoriesListView.DividerHeight = 0; #region Create List Fields if (AppInfo.IsLocaleRu) { _categoriesList.Add(new CategoriesListData() { CategoryNameText = "Все категории" }); } else { _categoriesList.Add(new CategoriesListData() { CategoryNameText = "All categories" }); } for (int i = 0; i < AppInfo._achievesInfo.CategoriesCount; i++) { if (i == 0) { _categoriesList.Add(new CategoriesListData() { CategoryNameText = AppInfo._achievesInfo.CategoryArray[i].DisplayName }); } else { _categoriesList.Add(new CategoriesListData() { CategoryNameText = AppInfo._achievesInfo.CategoryArray[i].DisplayName }); } if (_previousSelectedCategoryId == null) { _previousSelectedCategoryId = _selectedCategoryId; } } _selectedCategoryId = _categoriesList[0].CategoryNameText; _categoryViewRelativeLayout.FindViewById <TextView>(Resource.Id.secondscr_CategNameRowTextView).Text = _categoriesList[0].CategoryNameText; #endregion _categoriesListAdapter = new CategoriesListItemAdapter(this, Resource.Layout.secondscreendropdownlistrow, _categoriesList); _categoriesListView.Adapter = _categoriesListAdapter; _categoriesshadowImageView.Visibility = ViewStates.Gone; }
void GetCategoryView() { _categoriesList = new List<CategoriesListData>(); _categoriesListView = FindViewById<ListView>(Resource.Id.categorieslistView); _categoriesshadowImageView = FindViewById<ImageView>(Resource.Id.categoriesListDownShadowImageView); _categoriesListView.Visibility = ViewStates.Gone; _categoriesListView.DividerHeight = 0; #region Create List Fields if (AppInfo.IsLocaleRu) { _categoriesList.Add(new CategoriesListData() { CategoryNameText = "Все категории" }); } else { _categoriesList.Add(new CategoriesListData() { CategoryNameText = "All categories" }); } for (int i = 0; i < AppInfo._achievesInfo.CategoriesCount; i++) { if (i == 0) { _categoriesList.Add(new CategoriesListData() { CategoryNameText = AppInfo._achievesInfo.CategoryArray[i].DisplayName }); } else { _categoriesList.Add(new CategoriesListData() { CategoryNameText = AppInfo._achievesInfo.CategoryArray[i].DisplayName }); } if (_previousSelectedCategoryId == null) { _previousSelectedCategoryId = _selectedCategoryId; } } _selectedCategoryId = _categoriesList[0].CategoryNameText; _categoryViewRelativeLayout.FindViewById<TextView>(Resource.Id.secondscr_CategNameRowTextView).Text = _categoriesList[0].CategoryNameText; #endregion _categoriesListAdapter = new CategoriesListItemAdapter(this, Resource.Layout.secondscreendropdownlistrow, _categoriesList); _categoriesListView.Adapter = _categoriesListAdapter; _categoriesshadowImageView.Visibility = ViewStates.Gone; }