A wrapper for this project https://github.com/JeasonWong/ElemeShoppingView
A cool shopping cart effect.
NOTE :
ShoppingView
Author: SMM
Version: 0.01
Sample
Version 2 fixes a bug reported here . Thank you itgirl
A cool shopping cart effect.
NOTE :
B4X:
@DependsOn(values={"android-support-v4"})
B4X:
#AdditionalRes : ..\res
Author: SMM
Version: 0.01
- ShoppingView
Events:- _add
- _minus
- ba As BA
- BringToFront
- Initialize (EventName As String, bgcolor As Int, textSize As Float, numbercolor As Int, textcolor As Int)
- 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)
- Background As Drawable
- Color As Int [write only]
- Duration As Int [write only]
- Enabled As Boolean
- Height As Int
- Left As Int
- Parent As Object [read only]
- ShoppingText As String [write only]
- Tag As Object
- TextNum As Int
- Top As Int
- Visible As Boolean
- Width As Int
Sample
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim demo As ShoppingView
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("Layout1")
demo.Initialize("buy",Colors.Green,18,Colors.Yellow,Colors.Black)
Activity.AddView(demo,0,0,100%x,100%y)
demo.ShoppingText="Buy B4A"
demo.Duration=100
End Sub
Sub buy_add
Log(demo.TextNum)
End Sub
Sub buy_minus
Log(demo.TextNum)
End Sub
Version 2 fixes a bug reported here . Thank you itgirl
Attachments
Last edited: