Hi, All
Is it possible by a code module to make a new view type, using standard views ?
For example, i'd like to make Tabs view (tabs like of TabHost view, but fully controllably by the design).
I think I need for the whole view: a Panel with overall dimensions, tabs qty.
For each tab i need an ImageView (for icon), a Label (for Title text with TextSize and Typeface properties), a ToggleButton for 2 graphical states (selected tab\unselected one).
How to make events, properties, their get\set subs to update the view ?
I'm trying and messed...:-(
Cannot understand how to correctly make methods, properties changes, and event of the new view....
Is it possible by a code module to make a new view type, using standard views ?
For example, i'd like to make Tabs view (tabs like of TabHost view, but fully controllably by the design).
I think I need for the whole view: a Panel with overall dimensions, tabs qty.
For each tab i need an ImageView (for icon), a Label (for Title text with TextSize and Typeface properties), a ToggleButton for 2 graphical states (selected tab\unselected one).
How to make events, properties, their get\set subs to update the view ?
I'm trying and messed...:-(
B4X:
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim Top, Left, Width, Height As Int: Top = 0: Left = 0: Width = 300dip: Height = 50dip
'Dim Visible As Boolean
Dim TabCount, CurrentTab As Int
Dim TextSize As Int, TextFont As Typeface
Type aTab (aTabBody As ToggleButton , Title As Label, Icon As ImageView)
Type Tabs (Container As Panel, ActivityName As String, EventName As String)
End Sub
Sub AddTab (TabsObj As Tabs, Title As String)
Dim a As aTab
a.Initialize
a.aTabBody.Initialize("AllTabs")
a.Title.Initialize("AllTabs")
a.Icon.Initialize("AllTabs")
TabsObj.Container.AddView(a, ???????????
End Sub
Sub AllTabs_Click
End Sub
Sub Initialize (ActivityName As String, EventName As String)
Dim t As Tabs
t.Container.Initialize("")
t.ActivityName = ActivityName
t.EventName = EventName
End Sub
Sub UpdateTabs (Top As Int, Left As Int, Width As Int, Height As Int, TextSize As Int, TextFont As Typeface)
End Sub
Cannot understand how to correctly make methods, properties changes, and event of the new view....