1def row_gap_anim(obj, v): 2 obj.set_style_pad_row(v, 0) 3 4 5def column_gap_anim(obj, v): 6 obj.set_style_pad_column(v, 0) 7 8# 9# Demonstrate the effect of column and row gap style properties 10# 11 12cont = lv.obj(lv.scr_act()) 13cont.set_size(300, 220) 14cont.center() 15cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP) 16 17for i in range(9): 18 obj = lv.obj(cont) 19 obj.set_size(70, lv.SIZE.CONTENT) 20 21 label = lv.label(obj) 22 label.set_text(str(i)) 23 label.center() 24 25a_row = lv.anim_t() 26a_row.init() 27a_row.set_var(cont) 28a_row.set_values(0, 10) 29a_row.set_repeat_count(lv.ANIM_REPEAT.INFINITE) 30 31a_row.set_time(500) 32a_row.set_playback_time(500) 33a_row.set_custom_exec_cb(lambda a,val: row_gap_anim(cont,val)) 34lv.anim_t.start(a_row) 35 36a_col = lv.anim_t() 37a_col.init() 38a_col.set_var(cont) 39a_col.set_values(0, 10) 40a_col.set_repeat_count(lv.ANIM_REPEAT.INFINITE) 41 42a_col.set_time(3000) 43a_col.set_playback_time(3000) 44a_col.set_custom_exec_cb(lambda a,val: column_gap_anim(cont,val)) 45 46lv.anim_t.start(a_col) 47 48