wechat_press_btn.add_style(style_common_bg_rect_btn_pressed, lv.PART.MAIN | lv.STATE.PRESSED)
wechat_press_btn.set_style_radius(30,0)
-wechat_press_label = lv.label(wechat_press_btn)
+wechat_press_label = lv.label(wechat_screen)
wechat_press_label.set_text("请按住说话")
-wechat_press_label.align(lv.ALIGN.CENTER, 10, 0)
+wechat_press_label.set_size(240, 56)
+wechat_press_label.set_pos(0,278)
+wechat_press_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
wechat_press_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
wechat_label = lv.label(wechat_screen_list_screen)
_btn_label2 = lv.label(wechat_btn)
_btn_img = lv.img(wechat_btn)
wechat_btn.add_flag(lv.obj.FLAG.HIDDEN)
+ wechat_btn.add_flag(lv.obj.FLAG.CLICKABLE)
wechat_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.play_label_cb(e)),
lv.EVENT.CLICKED, None)
self.wechat_list_dict.append({"num":i,"wechat_btn":wechat_btn,"_btn_label1":_btn_label1,"_btn_label2":_btn_label2,"_btn_img":_btn_img})
#Wechat_log("wechat_list_dict:num:{}".format(self.wechat_list_dict[i]["num"]))
value = self.wechat_recode_list[key]
-
- self.startY = 56*i
+
+ self.startY = 64*i
if value.find("S:") != -1 or value.find("R:") != -1:
self.msg_tmp = value[2:]
#wechat_btn = lv.btn(self.wechat_list)
# if value.find("R:") != -1:self.wechat_list_dict[i]
- self.wechat_list_dict[i]["wechat_btn"].set_size(self.startWidth,54)
+
if value.find("R:") != -1 or value.find("T:") != -1 :#显示文字:
+ if value.find("T:") != -1:
+ self.wechat_list_dict[i]["wechat_btn"].set_size(self.startWidth,62)
+ else:
+ self.wechat_list_dict[i]["wechat_btn"].set_size(self.startWidth,62)
+
self.wechat_list_dict[i]["wechat_btn"].set_pos(10,self.startY )
#self.wechat_list_dict[i]["wechat_btn"].add_style(style_wechat_s_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
self.wechat_list_dict[i]["wechat_btn"].set_style_bg_color(lv.color_make(0xff, 0xff, 0xff), lv.PART.MAIN | lv.STATE.DEFAULT)
elif value.find("S:") != -1 :
+ self.wechat_list_dict[i]["wechat_btn"].set_size(self.startWidth,62)
self.wechat_list_dict[i]["wechat_btn"].set_pos(230-self.startWidth,self.startY )
#for k in range(100):
#self.wechat_list_dict[i]["wechat_btn"].add_style(style_wechat_r_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
self.wechat_list_dict[i]["wechat_btn"].set_style_bg_color(lv.color_make(0x00, 0xff, 0x2a), lv.PART.MAIN | lv.STATE.DEFAULT)
-
#_btn_label1 = lv.label(wechat_btn)
if value.find("R:") != -1: