display_screen()
  • 1 Minute to read

display_screen()


Article summary

This method shows an informative screen.

An informative screen is being used to display information about some process/flow, without asking for feedback from the user. This component is typically used while the program is loading, the robot is performing a task or about to perform a task

Reference

Screen Shot 2022-07-07 at 11.01.44 AM.png

Explore more about this component here

Arguments

ArgumentsTypeDefault Value
titlestringTitle of the screen (mandatory)
title_sizeenumUI_TITLE_SIZE.MEDIUMSize of the title
subtitlestringSubtitle of the screen (optional)
show_loaderbooleanFalseIf True, a loader is displayed in the center of the screen
show_back_buttonboolFalseShow a button to go back
back_button_textstring"Back"Text of the back button
button_sizeint1Button size (1 = SMALL, 2 = MEDIUM, 3 = LARGE)
languageslistNoneList of languages to be displayed on the screen (optional)
chosen_languageanyNonethe language chosen for the screen (from languages list)
themeenumUI_THEME_TYPE.DARKEnum to define the theme of the screen, check UI_THEME_TYPE
custom_styledictNoneDictionary containing custom styles for the screen

See the complete list of general enumerations.

Return

None

Exceptions

  • RayaUIMissingValue

See the complete list of ui exceptions and the complete list of general exceptions.

Example

...

class RayaApplication(RayaApplicationBase):

    async def setup(self):
        self.UI = await self.enable_controller('ui')
        ....
        
    async def loop(self):
     ....
        await self.UI.display_screen(
            title="Navigating to kitchen", 
            subtitle="will be there soon", 
            show_loader=True
        )
      ...
      
    async def finish(self):
      ...

...

Was this article helpful?