The attached project comes from here (I have conducted some open heart surgery on it). It is working perfectly on my 7" tablet but on my Samsung S4 mini, unlike what is the case on my tablet, the bitmaps are not centre(?). I guess it has something to do with the difference between the two displays.
The library files are in the /files folder of the attached B4A project. Copy them to your additional library folder.
The "buttons" have a very nice ripple animation. Click anywhere on a "button" and see the circular ripple progressing outwards from the point of touch. Have added a call back to the java code to raise events in the B4A project when the ripple starts and when the ripple ends (the start event can thus be used as a "button" click event. You can also "drag around" the "starting point of the ripple by touching the view, moving your finger to a different position on the view, and the lifting your finger at the position where you want the ripple to start.
Posting the B4A project as it is at present and also the Java code. I hope that someone will be able to use the java code and find a solution for the bitmaps not being centre on some displays (will it help to make the bitmaps smaller? Have not tried it yet...)
The project uses nineoldandroids-2.4.0.jar - so, you need to have it in your additional library folder.
As it stands at present:
ripview
Author: Muthuramakrishnan/Johan Schoeman
Version: 1
The library files are in the /files folder of the attached B4A project. Copy them to your additional library folder.
The "buttons" have a very nice ripple animation. Click anywhere on a "button" and see the circular ripple progressing outwards from the point of touch. Have added a call back to the java code to raise events in the B4A project when the ripple starts and when the ripple ends (the start event can thus be used as a "button" click event. You can also "drag around" the "starting point of the ripple by touching the view, moving your finger to a different position on the view, and the lifting your finger at the position where you want the ripple to start.
Posting the B4A project as it is at present and also the Java code. I hope that someone will be able to use the java code and find a solution for the bitmaps not being centre on some displays (will it help to make the bitmaps smaller? Have not tried it yet...)
The project uses nineoldandroids-2.4.0.jar - so, you need to have it in your additional library folder.
As it stands at present:
ripview
Author: Muthuramakrishnan/Johan Schoeman
Version: 1
- RipView
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)
- AlphaFactor As Float [write only]
- Background As Drawable
- ButtonBitmap As Bitmap [write only]
- ButtonText As String [write only]
- ButtonTextColor As Int [write only]
- ButtonTextSize As Float [write only]
- Color As Int [write only]
- Enabled As Boolean
- Height As Int
- Hover As Boolean [write only]
- Left As Int
- RippleColor As Int [write only]
- Tag As Object
- Top As Int
- Visible As Boolean
- Width As Int
Attachments
Last edited: