def tableview_cell_for_row(self, tableview, section, row):
status = self.data[row]['status']
cell = ui.TableViewCell('subtitle')
cell.text_label.text = self.data[row]['name']
cell.border_color = self.theme_manager.currentTheme.tintColour
cell.background_color = self.theme_manager.currentTheme.backgroundColour
cell.bar_tint_color = self.theme_manager.currentTheme.tintColour
cell.bg_color = self.theme_manager.currentTheme.backgroundColour
cell.tint_color = self.theme_manager.currentTheme.tintColour
cell.text_label.text_color = self.theme_manager.currentTheme.textColour
cell.detail_text_label.text_color = self.theme_manager.currentTheme.subTextColour
if not status == 'downloading' or not 'stats' in self.data[row].keys():
cell.detail_text_label.text = status
else:
cell.detail_text_label.text = self.data[row]['stats']
if not self.data[row]['image'] == None:
cell.image_view.image = self.data[row]['image']
iv = self.__getDetailButtonForStatus(status, cell.height, self.action, self.data[row])
iv.x = cell.content_view.width - (iv.width * 1.5)
iv.y = (cell.content_view.height) - (iv.height * 1.05)
iv.flex = 'L'
cell.content_view.add_subview(iv)
cell.selectable = False
return cell
评论列表
文章目录