/// <summary> /// Set up items in the list view according to <code>options.genres</code>. /// </summary> private void populateListView() { detailView.BeginUpdate(); detailView.Items.Clear(); foreach (AccountGenre g in options.genres) { ListViewItem lvi = new GenreListItem(this, g); detailView.Items.Add(lvi); } updateItems(); // fill in the sub texts detailView.EndUpdate(); }
/// <summary> /// Get a View that displays the data at the specified index in the genre list. /// </summary> /// <param name="index">The index of the genre list.</param> /// <returns>A View corresponding to the genre list at the specified index.</returns> public override View GetItemView(int index) { Tizen.Log.Fatal("NUI.ChannelList", "GetItemView ... " + index); object data = GetData(index); GenreListData itemData = data as GenreListData; GenreListItem itemView = new GenreListItem(); itemView.Text = itemData.Name; return(itemView); }
/// <summary> /// Update View that displays the data at the specified index in the genre list when data change. /// </summary> /// <param name="index">The index of the genre list.</param> /// <param name="view">A View that displays the data at the specified index in the genre list.</param> public override void UpdateItem(int index, View view) { Tizen.Log.Fatal("NUI.ChannelList", "UpdateItem...index: " + index); object data = GetData(index); GenreListData itemData = data as GenreListData; GenreListItem itemView = view as GenreListItem; if (itemView != null) { itemView.Text = itemData.Name; } }
/// <summary> /// Update View that displays the data at the specified index in the genre list when focus change. /// </summary> /// <param name="index">The index of the genre list.</param> /// <param name="view">A View that displays the data at the specified index in the genre list.</param> /// <param name="flagFocused">True means the item state change to focus, false means the item state change to unfocus.</param> public override void FocusChange(int index, View view, bool flagFocused) { Tizen.Log.Fatal("NUI.ChannelList", "FocusChange... index:" + index + ", flagFocused: " + flagFocused); object data = GetData(index); GenreListData itemData = data as GenreListData; GenreListItem itemView = view as GenreListItem; if (itemView != null) { itemView.Focus(flagFocused); } }