def on_draw(self):
    self.is_dirty = False
    if (not self.__initialized):
        self.__lazy_init()
    x_offset = 4
    y_offset = 6
    lcd.clear()
    for i in range(self.current_offset, len(self.current_dir_files)):
        file_name = self.current_dir_files[i]
        print(file_name)
        try:
            f_stat = os.stat(('/sd/' + file_name))
            if S_ISDIR(f_stat[0]):
                file_name = (file_name + '/')
            file_readable_size = sizeof_fmt(f_stat[6])
            lcd.draw_string((lcd.width() - 50), y_offset, file_readable_size, lcd.WHITE, lcd.BLUE)
        except Exception as e:
            print('-------------------->', e)
        is_current = (self.current_selected_index == i)
        line = ('%s %d %s' % (('->' if is_current else '  '), i, file_name))
        lcd.draw_string(x_offset, y_offset, line, lcd.WHITE, lcd.RED)
        y_offset += 18
        if (y_offset > lcd.height()):
            print(y_offset, lcd.height(), 'y_offset > height(), break')
            break
def on_draw(self):
    self.is_dirty = False
    if (not self.__initialized):
        self.__lazy_init()
    x_offset = 4
    y_offset = 6
    lcd.clear()
    for i in range(self.current_offset, len(self.current_dir_files)):
        file_name = self.current_dir_files[i]
        print(file_name)
        try:
            f_stat = os.stat(('/sd/' + file_name))
            if S_ISDIR(f_stat[0]):
                file_name = (file_name + '/')
            file_readable_size = sizeof_fmt(f_stat[6])
            lcd.draw_string((lcd.width() - 50), y_offset, file_readable_size, lcd.WHITE, lcd.BLUE)
        except Exception as e:
            print('-------------------->', e)
        is_current = (self.current_selected_index == i)
        line = ('%s %d %s' % (('->' if is_current else '  '), i, file_name))
        lcd.draw_string(x_offset, y_offset, line, lcd.WHITE, lcd.RED)
        y_offset += 18
        if (y_offset > lcd.height()):
            print(y_offset, lcd.height(), 'y_offset > height(), break')
            break