B4X:
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
#Extends: android.support.v7.app.AppCompatActivity
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim AC As AppCompat
Dim ABHelper As ACActionBar
Private ActionBar As ACToolBarLight
Private lblContent As Label
Private lblDatum As Label
Private lblDetail As Label
Private lblTitle As Label
Private pContent As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("detailberichtlayout")
'ActionBar.InitMenuListener
ActionBar.SetAsActionBar
ABHelper.Initialize
pContent.LoadLayout("detailberichtcontentlayout")
Dim myicon As String = ""
Select Case Starter.selected_notificationsoort.soort
Case "P"
myicon = "gateicon128.png"
Case "A"
myicon = "bellicon.png"
Case "K"
myicon = "bearicon.png"
Case "D"
myicon = "homeicon.png"
End Select
'privbar.Icon = LoadBitmap(File.DirAssets,myicon)
ActionBar.LogoBitmap = LoadBitmap(File.DirAssets, myicon)
Dim readabledatum As String
DateTime.DateFormat= "dd/MM/yyyy"
DateTime.TimeFormat = "HH:mm:ss"
readabledatum = DateTime.Date(Starter.selected_customnotification.datum) & " " & DateTime.Time(Starter.selected_customnotification.datum)
lblDatum.Text = readabledatum
lblTitle.Text = Starter.selected_customnotification.title
lblContent.Text = Starter.selected_customnotification.content
lblDetail.Text = Starter.selected_customnotification.detail
ABHelper.ShowUpIndicator = True
End Sub
Sub Activity_ActionBarHomeClick
Log ("klik")
Activity.Finish
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
the "Activity_ActionBarHomeClick" will not fire.
Does anybody have a clue?
Greets John