def create_item(self, account):
"""
Creates an account list item from given account.
"""
address = "0x" + account.address.encode("hex")
# gets the alias if exists
try:
text = Controller.get_address_alias(address)
except KeyError:
text = address
list_item = OneLineListItem(text=text)
# makes sure the address doesn't overlap on small screen
list_item.ids._lbl_primary.shorten = True
list_item.account = account
list_item.bind(on_release=lambda x: self.on_release(x))
return list_item
评论列表
文章目录