protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.HomeScreen); tasks = TodoItemManager.GetTasks(); foreach (TodoItem task in tasks) { tableItems.Add(new TableItem() { Heading = task.Name, SubHeading = task.Date }); } listView = FindViewById <ListView>(Resource.Id.TaskList); listView.Adapter = new HomeScreenAdapter(this, tableItems); listView.ItemClick += OnListItemClick; addButton = FindViewById <ImageButton> (Resource.Id.addButton); if (addButton != null) { addButton.Click += (sender, e) => { StartActivity(typeof(TodoItemScreen)); }; } }
protected override void OnResume() { base.OnResume(); tasks = TodoItemManager.GetTasks(); // create our adapter taskList = new TodoItemListAdapter(this, tasks); //Hook up our adapter to our ListView taskListView.Adapter = taskList; }
protected override void OnResume() { base.OnResume(); tasks = TodoItemManager.GetTasks(); tableItems.Clear(); foreach (TodoItem task in tasks) { tableItems.Add(new TableItem() { Heading = task.Name, SubHeading = task.Date }); } }
protected void PopulateTable() { tasks = TodoItemManager.GetTasks().ToList(); // var rows = from t in tasks // select (Element)new StringElement ((t.Name == "" ? "<new task>" : t.Name), t.Notes); // TODO: use this element, which displays a 'tick' when item is completed var rows = from t in tasks select(Element) new CheckboxElement((t.Name == "" ? "<new task>" : t.Name), t.Done); var s = new Section(); s.AddAll(rows); Root = new RootElement("Tasky") { s }; }
//Verificar si esta en la lista de favoritos public int isListNotas(String Titulo) { //Sacar la lista de Favoritos listNotas.Clear(); listNotas = TodoItemManager.GetTasks(); //----------------------------- int tam = listNotas.Count; for (int i = 0; i < tam; i++) { if (listNotas[i].Name.Equals(Titulo)) { return(listNotas[i].ID);; } } return(-1); }
async protected override void OnCreate(Bundle bundle) { //Sacar la lista de Favoritos listNotas = TodoItemManager.GetTasks(); //----------------------------- this.Window.AddFlags(WindowManagerFlags.Fullscreen); base.OnCreate(bundle); var metrics = Resources.DisplayMetrics; widthInDp = ((int)metrics.WidthPixels); heightInDp = ((int)metrics.HeightPixels); Configuration.setWidthPixel(widthInDp); Configuration.setHeigthPixel(heightInDp); vm = this.ViewModel as LOViewModel; int tam = Configuration.getWidth(80); drBack = new BitmapDrawable(Bitmap.CreateScaledBitmap(getBitmapFromAsset("images/fondocondiagonalm.png"), 640, 1136, true)); LinearLayout test = new LinearLayout(this); test.LayoutParameters = new LinearLayout.LayoutParams(-1, -1); test.SetBackgroundColor(Color.Black); SetContentView(test); _dialogDownload = new ProgressDialog(this); _dialogDownload.SetCancelable(false); _dialogDownload.SetMessage("Cargando"); _dialogDownload.Show(); adsImagesPath = AddResources.Instance.addList; await ini(); //LoadPagesDataSource (); SetContentView(_mainLayout); _dialogDownload.Dismiss(); }