A wrap for this Github project. Posting
1. B4A project
2. B4A library files
Take note of the following in the B4A code (set your path correctly):
Take note of the B4A Manifest file:
Take note of the PanelViewRes and resource folders in the B4A project
I suggest that before you run the project you "clean" it with the B4A IDE (Tools ----> Clean project)
Sample Code:
Library:
PanelView
Author: Github: githubwing, Wrapped by: Johan Schoeman
Version: 1.03
1. B4A project
2. B4A library files
Take note of the following in the B4A code (set your path correctly):
B4X:
'IMPORTANT!!!! YOU NEED TO SET THE FOLLOWING PATHS CORRECTLY FOR YOUR OWN COMPUTER!!!!!!!!!!!!!!!!!!
'THE BELOW PATH IS THE PATH FOR MY COMPUTER
#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
#Extends: android.support.v7.app.AppCompatActivity
Take note of the B4A Manifest file:
B4X:
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
Take note of the PanelViewRes and resource folders in the B4A project
I suggest that before you run the project you "clean" it with the B4A IDE (Tools ----> Clean project)
Sample Code:
B4X:
#Region Project Attributes
#ApplicationLabel: PanelView
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\PanelViewRes
#AdditionalRes: ..\resource
'IMPORTANT!!!! YOU NEED TO SET THE FOLLOWING PATHS CORRECTLY FOR YOUR OWN COMPUTER!!!!!!!!!!!!!!!!!!
'THE BELOW PATH IS THE PATH FOR MY COMPUTER
#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
#Extends: android.support.v7.app.AppCompatActivity
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim t As Timer
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.
Private pv1 As PanelView
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("main")
t.Initialize("t", 1000)
pv1.Text = "Some Random Value"
pv1.Percent = 0
pv1.ArcValueColor = Colors.yellow
pv1.ArcBlankColor = Colors.white
pv1.ArcWidth = 40
pv1.TextSize = 25
pv1.PointerColor = Colors.Magenta
pv1.TextColor = Colors.Cyan
End Sub
Sub Activity_Resume
t.Enabled = True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
t.Enabled = False
End Sub
Sub t_tick
Dim value As Int = Rnd(0,101)
pv1.Percent = value
End Sub
Library:
PanelView
Author: Github: githubwing, Wrapped by: Johan Schoeman
Version: 1.03
- PanelView
Fields:- ba As BA
- BringToFront
- DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
- Initialize (EventName As String)
- Invalidate
- Invalidate2 (arg0 As Rect)
- Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- IsInitialized As Boolean
- RemoveView
- RequestFocus As Boolean
- SendToBack
- SetBackgroundImage (arg0 As Bitmap)
- SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
- SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
- SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
- ArcBlankColor As Int [write only]
- ArcValueColor As Int [write only]
- ArcWidth As Int [write only]
- Background As Drawable
- Color As Int [write only]
- Enabled As Boolean
- Height As Int
- Left As Int
- Parent As Object [read only]
- Percent As Int [write only]
- PointerColor As Int [write only]
- Tag As Object
- Text As String [write only]
- TextColor As Int [write only]
- TextSize As Int [write only]
- Top As Int
- Visible As Boolean
- Width As Int