Skip to content

Commit ce6999c

Browse files
New Sample: Icon Tab Bar - Separator (#261)
1 parent 510b0dd commit ce6999c

File tree

3 files changed

+175
-0
lines changed

3 files changed

+175
-0
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,14 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
910910
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
911911
).
912912

913+
panel->generic_tile(
914+
header = 'Icon Tab Bar'
915+
subheader = 'Separator'
916+
press = client->_event( 'Z2UI5_CL_DEMO_APP_225' )
917+
mode = 'LineMode'
918+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
919+
).
920+
913921
panel = page->panel(
914922
expandable = abap_false
915923
expanded = abap_true

src/z2ui5_cl_demo_app_225.clas.abap

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
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.

src/z2ui5_cl_demo_app_225.clas.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
3+
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4+
<asx:values>
5+
<VSEOCLASS>
6+
<CLSNAME>Z2UI5_CL_DEMO_APP_225</CLSNAME>
7+
<LANGU>E</LANGU>
8+
<DESCRIPT>Icon Tab Bar - Separator</DESCRIPT>
9+
<STATE>1</STATE>
10+
<CLSCCINCL>X</CLSCCINCL>
11+
<FIXPT>X</FIXPT>
12+
<UNICODE>X</UNICODE>
13+
</VSEOCLASS>
14+
</asx:values>
15+
</asx:abap>
16+
</abapGit>

0 commit comments

Comments
 (0)