private async void LoadAll() { try { //FindViewById<CardView>(Resource.Id.ReloadTest).Visibility = Android.Views.ViewStates.Gone; Tickets = await new AnsweredService().GetIncorrectTicketAsync(GetTicketBy.All); var meneger = new LinearLayoutManager(this) { Orientation = LinearLayoutManager.Vertical }; Recycler.SetLayoutManager(meneger); Recycler.SetAdapter(new EndUiAdapter(Tickets)); } catch (SQLite.SQLiteException) { Android.Support.V7.App.AlertDialog.Builder alert = new Android.Support.V7.App.AlertDialog.Builder(this); alert.SetTitle("სტატისტიკა"); alert.SetMessage("ჯერ გაიარე ტესტი"); Dialog dialog = alert.Create(); dialog.Show(); } }
private void Initialize() { var inflater = (LayoutInflater)Context.GetSystemService(Context.LayoutInflaterService); inflater.Inflate(Resource.Layout.ColorPicker, this); Recycler = FindViewById <RecyclerView> (Resource.Id.ColorPickerRecyclerView); LayoutManager = new GridLayoutManager(Context, ColumnsCount); Recycler.SetLayoutManager(LayoutManager); Adapter = new ColorPickerAdapter(); Recycler.SetAdapter(Adapter); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_category); Online = Intent.GetBooleanExtra("Online", false); Recycler = FindViewById <RecyclerView>(Resource.Id.categoryRecycler); Recycler.SetLayoutManager(new GridLayoutManager(this, 3)); Animations = new AndroidAnimations(this); Load(); }
private async void Load() { var TicketsCountStr = Intent.Extras.Get("TicketsCount").ToString(); int.TryParse(TicketsCountStr, out int TicketsCountInt); var ticketsLstHrs = await new AnsweredService().GetIncorrectTicketAsync(GetTicketBy.Hrs); Tickets = ticketsLstHrs.Where(o => o.Id >= ticketsLstHrs.ElementAt(ticketsLstHrs.Count() - TicketsCountInt).Id); var meneger = new LinearLayoutManager(this) { Orientation = LinearLayoutManager.Vertical }; Recycler.SetLayoutManager(meneger); Recycler.SetAdapter(new EndUiAdapter(Tickets)); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_topic); Recycler = FindViewById <RecyclerView>(Resource.Id.TopicRecycler); Confirm = FindViewById <ImageView>(Resource.Id.StartTestImg); ProgressBar = FindViewById <ProgressBar>(Resource.Id.DownloadingProgress); var manager = new LinearLayoutManager(this) { Orientation = (int)Orientation.Vertical }; Recycler.SetLayoutManager(manager); Online = Intent.GetBooleanExtra("Online", false); Category = Intent.GetStringExtra("Category"); Animations = new AndroidAnimations(this); try { Load(); } catch (Java.Net.UnknownHostException) { Android.Support.V7.App.AlertDialog.Builder alert = new Android.Support.V7.App.AlertDialog.Builder(this); alert.SetTitle("ინტერნეტის კავშირი"); alert.SetMessage("ეს აპლიკაცია ირთვება პირვლად იმისთვის რომ ჩაირთოს საჭიროა ინტერნეტთან კავშირი შეკითხვების გადმოსაწერათ ერთჯერადი კავშირია."); Dialog dialog = alert.Create(); dialog.Show(); } // hide Loaging Animation ProgressBar.Visibility = Android.Views.ViewStates.Gone; Confirm.Click += StartTesting; }