|
| 1 | +class z2ui5_cl_demo_app_225 definition |
| 2 | + public |
| 3 | + create public . |
| 4 | + |
| 5 | +public section. |
| 6 | + |
| 7 | + interfaces Z2UI5_IF_APP . |
| 8 | + |
| 9 | + data CHECK_INITIALIZED type ABAP_BOOL . |
| 10 | + PROTECTED SECTION. |
| 11 | + |
| 12 | + METHODS display_view |
| 13 | + IMPORTING |
| 14 | + client TYPE REF TO z2ui5_if_client. |
| 15 | + METHODS on_event |
| 16 | + IMPORTING |
| 17 | + client TYPE REF TO z2ui5_if_client. |
| 18 | + |
| 19 | + PRIVATE SECTION. |
| 20 | +ENDCLASS. |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +CLASS z2ui5_cl_demo_app_225 IMPLEMENTATION. |
| 25 | + |
| 26 | + |
| 27 | + METHOD DISPLAY_VIEW. |
| 28 | + |
| 29 | + DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( |
| 30 | + )->page( |
| 31 | + title = 'abap2UI5 - Sample: Icon Tab Bar - Separator' |
| 32 | + navbuttonpress = client->_event( 'BACK' ) |
| 33 | + shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). |
| 34 | + |
| 35 | + DATA(layout) = page->label( wrapping = `true` |
| 36 | + text = `No icon(='') used as separator, the separator will be a vertical line.` |
| 37 | + class = `sapUiSmallMargin` ). |
| 38 | + |
| 39 | + layout->icon_tab_bar( id = `idIconTabBarSeparatorNoIcon` |
| 40 | + expanded = `false` |
| 41 | + class = `sapUiResponsiveContentPadding` |
| 42 | + )->items( |
| 43 | + )->icon_tab_filter( key = `info` |
| 44 | + icon = `sap-icon://hint` |
| 45 | + iconcolor = `Neutral` |
| 46 | + )->text( text = `Info content goes here ...` )->get_parent( |
| 47 | + )->icon_tab_separator( icon = `` )->get_parent( |
| 48 | + )->icon_tab_filter( key = `attachments` |
| 49 | + icon = `sap-icon://attachment` |
| 50 | + iconcolor = `Neutral` |
| 51 | + count = `3` |
| 52 | + )->text( text = `Attachments go here ...` )->get_parent( |
| 53 | + )->icon_tab_filter( key = `notes` |
| 54 | + icon = `sap-icon://notes` |
| 55 | + count = `12` |
| 56 | + )->text( text = `Notes go here ...` )->get_parent( |
| 57 | + )->icon_tab_separator( icon = `` )->get_parent( |
| 58 | + )->icon_tab_filter( key = `people` |
| 59 | + icon = `sap-icon://group` |
| 60 | + iconcolor = `Negative` |
| 61 | + )->text( text = `People content goes here ...` |
| 62 | + ). |
| 63 | + |
| 64 | + layout->label( wrapping = `true` |
| 65 | + text = `Icon used as separator, you are free to choose an icon you want.` |
| 66 | + class = `sapUiSmallMargin` ). |
| 67 | + |
| 68 | + layout->icon_tab_bar( id = `idIconTabBarSeparatorIcon` |
| 69 | + expanded = `false` |
| 70 | + class = `sapUiResponsiveContentPadding` |
| 71 | + )->items( |
| 72 | + )->icon_tab_filter( key = `info` |
| 73 | + icon = `sap-icon://hint` |
| 74 | + iconcolor = `Neutral` |
| 75 | + )->text( text = `Info content goes here ...` )->get_parent( |
| 76 | + )->icon_tab_filter( key = `attachments` |
| 77 | + icon = `sap-icon://attachment` |
| 78 | + iconcolor = `Neutral` |
| 79 | + count = `3` |
| 80 | + )->text( text = `Attachments go here ...` )->get_parent( |
| 81 | + )->icon_tab_separator( icon = `sap-icon://process` )->get_parent( |
| 82 | + )->icon_tab_filter( key = `notes` |
| 83 | + icon = `sap-icon://notes` |
| 84 | + iconcolor = `Positive` |
| 85 | + count = `12` |
| 86 | + )->text( text = `Notes go here ...` )->get_parent( |
| 87 | + )->icon_tab_separator( icon = `sap-icon://process` )->get_parent( |
| 88 | + )->icon_tab_filter( key = `people` |
| 89 | + icon = `sap-icon://group` |
| 90 | + iconcolor = `Negative` |
| 91 | + )->text( text = `People content goes here ...` |
| 92 | + ). |
| 93 | + |
| 94 | + layout->label( wrapping = `true` |
| 95 | + text = `Different separators used.` |
| 96 | + class = `sapUiSmallMargin` ). |
| 97 | + |
| 98 | + layout->icon_tab_bar( id = `idIconTabBarSeparatorMixed` |
| 99 | + expanded = `false` |
| 100 | + class = `sapUiResponsiveContentPadding` |
| 101 | + )->items( |
| 102 | + )->icon_tab_filter( key = `info` |
| 103 | + icon = `sap-icon://hint` |
| 104 | + iconcolor = `Critical` |
| 105 | + )->text( text = `Info content goes here ...` )->get_parent( |
| 106 | + )->icon_tab_separator( icon = `` )->get_parent( |
| 107 | + )->icon_tab_filter( key = `info` |
| 108 | + icon = `sap-icon://attachment` |
| 109 | + iconcolor = `Neutral` |
| 110 | + count = `3` |
| 111 | + )->text( text = `Attachments go here ...` )->get_parent( |
| 112 | + )->icon_tab_separator( icon = `sap-icon://vertical-grip` )->get_parent( |
| 113 | + )->icon_tab_filter( key = `notes` |
| 114 | + icon = `sap-icon://notes` |
| 115 | + iconcolor = `Positive` |
| 116 | + count = `12` |
| 117 | + )->text( text = `Notes go here ...` )->get_parent( |
| 118 | + |
| 119 | + )->icon_tab_separator( icon = `sap-icon://process` )->get_parent( |
| 120 | + )->icon_tab_filter( key = `people` |
| 121 | + icon = `sap-icon://group` |
| 122 | + iconcolor = `Negative` |
| 123 | + )->text( text = `People content goes here ...` |
| 124 | + ). |
| 125 | + |
| 126 | + client->view_display( page->stringify( ) ). |
| 127 | + |
| 128 | + ENDMETHOD. |
| 129 | + |
| 130 | + |
| 131 | + METHOD ON_EVENT. |
| 132 | + |
| 133 | + CASE client->get( )-event. |
| 134 | + WHEN 'BACK'. |
| 135 | + client->nav_app_leave( ). |
| 136 | + ENDCASE. |
| 137 | + |
| 138 | + ENDMETHOD. |
| 139 | + |
| 140 | + |
| 141 | + METHOD Z2UI5_IF_APP~MAIN. |
| 142 | + |
| 143 | + IF check_initialized = abap_false. |
| 144 | + check_initialized = abap_true. |
| 145 | + display_view( client ). |
| 146 | + ENDIF. |
| 147 | + |
| 148 | + on_event( client ). |
| 149 | + |
| 150 | + ENDMETHOD. |
| 151 | +ENDCLASS. |
0 commit comments