示例#1
0
    def tableview_cell_for_row(self, tableview, section, row):
        cell = ui.TableViewCell('subtitle')
        app = self.apps[row]
        cell.text_label.text = StringProcess(app.getName())
        cell.detail_text_label.text = StringProcess(app.getAuthor())
        cell.image_view.image = ui.Image.named(self.app.rootpath + "img/" +
                                               app.getAppId() + ".png")
        cell.accessory_type = 'disclosure_indicator'

        self.loadCellPrice(cell, row)

        return cell
示例#2
0
	def tableview_cell_for_row(self, tableview, section, row):
		cell = ui.TableViewCell('subtitle')
		cell.selectable=False
		
		app = self.apps[row]
		cell.text_label.text = StringProcess(app.getName())
		cell.detail_text_label.text = StringProcess(app.getAuthor())
		img=ui.Image.named(self.app.rootpath+"img/"+app.getAppId()+".png")
		if self.app.width<500:
			# iPhone竖屏
			img=uiImgResize(img,(60,60))
		cell.image_view.image=img
		cell.accessory_type='disclosure_indicator'
	
		self.loadCellPrice(cell,row)

		return cell
示例#3
0
    def loadUI(self):
        '''
		基本信息
		---------------------------------
		'''
        self.infoView.background_color = "#fff"

        self.info_inconView.image = ui.Image.named(self.app.rootpath + "img/" +
                                                   self.obj.getAppId() +
                                                   ".png")
        if self.app.isIpad():
            self.info_inconView.border_width = 4
            self.info_inconView.border_color = "#f8f8f8"
            self.info_inconView.corner_radius = 30

        self.info_nameLabel.text = StringProcess(self.obj.getName())

        self.info_authorLabel.text = StringProcess(self.obj.getAuthor())
        self.info_authorLabel.text_color = '#979797'

        self.info_categoryLabel.title = self.obj.getApplicationCategory()
        self.info_categoryLabel.font = ("<system>", 15)
        self.info_categoryLabel.action = self.changeCategory_Act

        self.info_autoupdateLabel.text = "自动更新"

        self.info_autoupdateBtn.value = self.obj.getAutoUpdate()
        self.info_autoupdateBtn.tint_color = "#0987b4"
        self.info_autoupdateBtn.action = self.changeAutoUpdate_Act

        self.info_createtimeLabel.text = "收藏时间:" + self.obj.getCreateTime()

        self.info_updatetimeLabel.text = "更新时间:" + self.obj.getUpdateTime()

        if (self.obj.getStar() > 0):
            self.info_starBtn.background_image = ui.Image.named(
                self.app.rootpath + "UI/img/star_full.PNG")
        else:
            self.info_starBtn.background_image = ui.Image.named(
                self.app.rootpath + "UI/img/star_vacancy.PNG")
        self.info_starBtn.action = self.star_Act

        self.info_storeBtn.title = "访问商店"
        self.info_storeBtn.font = ('Arial', 20)
        #self.info_storeBtn.corner_radius=5
        self.info_storeBtn.bg_color = "#2f4658"
        self.info_storeBtn.tint_color = "#7ec1ec"
        self.info_storeBtn.action = self.appstore_Act

        self.info_updateBtn.title = "更新"
        self.info_updateBtn.font = ('Arial', 20)
        #self.info_updateBtn.corner_radius=5
        self.info_updateBtn.bg_color = "#007800"
        self.info_updateBtn.tint_color = "white"
        self.info_updateBtn.action = self.update_Act

        self.info_deleteBtn.title = "删除"
        self.info_deleteBtn.font = ('Arial', 20)
        #self.info_deleteBtn.corner_radius=5
        self.info_deleteBtn.bg_color = "#cc0000"
        self.info_deleteBtn.tint_color = "white"
        self.info_deleteBtn.action = self.delete_Act
        '''
		价格信息
		---------------------------------
		'''

        if (self.presentPrice.getPrice() == self.lastPrice.getPrice()):
            self.price_offLabel.hidden = True
        else:
            self.price_offLabel.hidden = False

        self.price_offLabel.updateData(self.lastPrice.getPrice(),
                                       self.presentPrice.getPrice())
        self.price_normalLabel.updateData(self.presentPrice)
        self.price_firstLabel.updateData(self.firstPrice)
        self.price_lowestLabel.updateData(self.lowestPrice)
        '''
		价格图表
		---------------------------------
		'''
        #self.graphView.background_color="red"

        self.graph_pricePlot.updateData(self.dates, self.prices_v,
                                        self.years[self.epoch])

        self.graph_epochBtn.segments = [str(x) for x in self.years]
        self.graph_epochBtn.selected_index = self.epoch
        self.graph_epochBtn.action = self.epoch_Act