RSS Standout


SUBMITTED BY: Guest

DATE: Aug. 4, 2014, 6:09 p.m.

FORMAT: C#

SIZE: 3.5 kB

HITS: 24713

  1. #Region Service Attributes
  2. #StartAtBoot: False
  3. #End Region
  4. Sub Process_Globals
  5. 'These global variables will be declared once when the application starts.
  6. 'These variables can be accessed from all modules.
  7. 'Declaration of constants
  8. 'Declaration of variabels
  9. Private mWindow As RSStandOutWindow
  10. Private mConstants As RSStandOutConstants
  11. Private mFlags As RSStandOutFlags
  12. End Sub
  13. Sub Service_Create
  14. End Sub
  15. Sub Service_Start (StartingIntent As Intent)
  16. mWindow.Initialize("Window")
  17. Main.StandOut.Show(mWindow.UniqueId)
  18. End Sub
  19. Sub Service_Destroy
  20. End Sub
  21. ' ! --------------- ! - EVENTS - ! --------------- !
  22. 'Do NOT call the events below.
  23. 'The methods below are called from the library and returns info back to it.
  24. Sub Window_Initialize (Id As Int, Window As RSStandOutWindow) As RSStandOutLayoutParams
  25. Dim params As RSStandOutLayoutParams
  26. params.Initialize4(Id, 400, 300, mConstants.AUTO_POSITION, mConstants.AUTO_POSITION, 100, 100)
  27. Return params
  28. End Sub
  29. 'Create a panel and add it to the frame.
  30. Sub Window_CreateAndAttachView (Id As Int, Frame As RSFrameLayout) As Panel
  31. Dim Content As Panel
  32. Content.Initialize("Content")
  33. Frame.AddView(Content, 400, 300)
  34. Dim btn As Button
  35. btn.Initialize("Button")
  36. btn.Text = "Test"
  37. Content.AddView(btn, 0dip, 0dip, Frame.Width, 48dip)
  38. Return Content
  39. End Sub
  40. 'Returns the name of the Window.
  41. Sub Window_AppName As String
  42. Return "RSStandOut Example"
  43. End Sub
  44. 'Returns the icon of the window.
  45. Sub Window_AppIcon As String
  46. Return "icon"
  47. End Sub
  48. 'Return a list of flags
  49. Sub Window_Flags (Id As Int) As List
  50. Dim flags As List
  51. flags.Initialize
  52. flags.Add(mFlags.FLAG_DECORATION_SYSTEM)
  53. flags.Add(mFlags.FLAG_BODY_MOVE_ENABLE)
  54. flags.Add(mFlags.FLAG_WINDOW_HIDE_ENABLE)
  55. flags.Add(mFlags.FLAG_WINDOW_BRING_TO_FRONT_ON_TAP)
  56. flags.Add(mFlags.FLAG_WINDOW_EDGE_LIMITS_ENABLE)
  57. flags.Add(mFlags.FLAG_WINDOW_PINCH_RESIZE_ENABLE)
  58. Return flags
  59. End Sub
  60. Sub Window_PersistentNotificationTitle(Id As Int) As String
  61. Return "RSStandOut Example Running"
  62. End Sub
  63. Sub Window_PersistentNotificationMessage(Id As Int) As String
  64. Return "Click to add a new RSStandOut example"
  65. End Sub
  66. Sub Window_PersistentNotificationIntent(Id As Int) As Intent
  67. Return Main.StandOut.getShowIntent(mWindow.UniqueId)
  68. End Sub
  69. Sub Window_HiddenIcon As String
  70. Return "icon"
  71. End Sub
  72. Sub Window_HiddenNotificationTitle(Id As Int) As String
  73. Return "RSStandOut Example Hidden"
  74. End Sub
  75. Sub Window_HiddenNotificationMessage(Id As Int) As String
  76. Return "Click to restore # " & Id
  77. End Sub
  78. Sub Window_HiddenNotificationIntent(Id As Int) As Intent
  79. Return Main.StandOut.getShowIntent(Id)
  80. End Sub
  81. 'Data = bundle (Use JavaObject)
  82. Sub Window_ReceiveData (Id As Int, RequestCode As Int, Data As Object, FromId As Int)
  83. Log("Data received from id: " & Id)
  84. End Sub

comments powered by Disqus