Skip to content

Commit 5a9f16c

Browse files
New Demo: Icon Tab Bar - Text and Count (#258)
1 parent a148175 commit 5a9f16c

File tree

3 files changed

+106
-0
lines changed

3 files changed

+106
-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
@@ -886,6 +886,14 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
886886
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
887887
).
888888

889+
panel->generic_tile(
890+
header = 'Icon Tab Bar'
891+
subheader = 'Text and Count'
892+
press = client->_event( 'Z2UI5_CL_DEMO_APP_222' )
893+
mode = 'LineMode'
894+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
895+
).
896+
889897
panel = page->panel(
890898
expandable = abap_false
891899
expanded = abap_true

src/z2ui5_cl_demo_app_222.clas.abap

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
class z2ui5_cl_demo_app_222 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_222 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 - Text and Count'
32+
navbuttonpress = client->_event( 'BACK' )
33+
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ).
34+
35+
DATA(layout) = page->icon_tab_bar( id = `idIconTabBarFiori2`
36+
expanded = `{device>/isNoPhone}`
37+
class = `sapUiResponsiveContentPadding`
38+
)->items(
39+
)->icon_tab_filter( text = `Info`
40+
key = `info`
41+
count = `3`
42+
)->text( text = `Info content goes here ...` )->get_parent(
43+
)->icon_tab_filter( text = `Attachments`
44+
key = `attachments`
45+
count = `4321`
46+
)->text( text = `Attachments go here ...` )->get_parent(
47+
)->icon_tab_filter( text = `Notes`
48+
key = `notes`
49+
count = `333`
50+
)->text( text = `Notes go here ...` )->get_parent(
51+
)->icon_tab_filter( text = `People`
52+
key = `people`
53+
count = `34`
54+
)->text( text = `People content goes here ...`
55+
).
56+
57+
client->view_display( page->stringify( ) ).
58+
59+
ENDMETHOD.
60+
61+
62+
METHOD ON_EVENT.
63+
64+
CASE client->get( )-event.
65+
WHEN 'BACK'.
66+
client->nav_app_leave( ).
67+
ENDCASE.
68+
69+
ENDMETHOD.
70+
71+
72+
METHOD Z2UI5_IF_APP~MAIN.
73+
74+
IF check_initialized = abap_false.
75+
check_initialized = abap_true.
76+
display_view( client ).
77+
ENDIF.
78+
79+
on_event( client ).
80+
81+
ENDMETHOD.
82+
ENDCLASS.

src/z2ui5_cl_demo_app_222.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_222</CLSNAME>
7+
<LANGU>E</LANGU>
8+
<DESCRIPT>Icon Tab Bar - Text and Count</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)