This is a simple panel that can be attached anywhere and opens with an animation.
More usecases and updates to come
I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal or with a coffee.
Examples:
ASFloatingPanel
Author: Alexander Stolte
Version: 1.01
More usecases and updates to come
I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal or with a coffee.
Examples:
B4X:
Dim fp As AS_FloatingPanel
fp.Initialize(Me,"fp",Root)
fp.PreSize(200dip,200dip)
fp.Panel.LoadLayout("frm_Content")
'Open the panel
fp.Show(0,0,200dip,200dip)
'or attached on a view
Dim Top As Float = xlbl_ClickMe.Top + xlbl_ClickMe.Height + 10dip
fp.Show(xlbl_ClickMe.Left,Top,200dip,200dip)
Author: Alexander Stolte
Version: 1.01
- ASFloatingPanel_ArrowProperties
- Fields:
- ArrowOrientation As String
- Color As Int
- Height As Float
- IsInitialized As Boolean
Tests whether the object has been initialized. - Left As Float
- Top As Float
- Width As Float
- Functions:
- Initialize
Initializes the fields to their default value.
- Initialize
- Fields:
- AS_FloatingPanel
- Events:
- Close
- Fields:
- BackgroundColor As Int
- Functions:
- Class_Globals As String
- Close
- CreateASFloatingPanel_ArrowProperties (ArrowOrientation As String, Color As Int, Width As Float, Height As Float, Left As Float, Top As Float) As ASFloatingPanel_ArrowProperties
- getArrowOrientation_Bottom As String
The Arrow is on the bottom of the panel - getArrowOrientation_Left As String
The Arrow is on the lft of the panel - getArrowOrientation_Right As String
The Arrow is on the right of the panel - getArrowOrientation_Top As String
The Arrow is on the top of the panel - getArrowProperties As ASFloatingPanel_ArrowProperties
- getArrowVisible As Boolean
- getOpenOrientation_BottomTop As String
Opens the panel from bottom to top - getOpenOrientation_LeftBottom As String
Opens the panel from left to bottom - getOpenOrientation_LeftRight As String
Opens the panel from left to right - getOpenOrientation_LeftTop As String
Opens the panel from left to top - getOpenOrientation_None As String
Opens the panel without slide, but with fade - getOpenOrientation_RightBottom As String
Opens the panel from right to bottom - getOpenOrientation_RightLeft As String
Opens the panel from right to left - getOpenOrientation_RightTop As String
Opens the panel from right to top - getOpenOrientation_TopBottom As String
Opens the panel from top to bottom - getPanel As B4XView
- Initialize (Callback As Object, EventName As String, Parent As B4XView) As String
Initializes the object. You can add parameters to this method if needed. - IsInitialized As Boolean
Tests whether the object has been initialized. - PreSize (Width As Float, Height As Float) As String
- setArrowProperties (Properties As ASFloatingPanel_ArrowProperties) As String
- setArrowVisible (Visible As Boolean) As String
- setDuration (Duration As Long) As String
Default: 150 - setOpenOrientation (Orientation As String) As String
- Show (Left As Float, Top As Float, Width As Float, Height As Float)
- Properties:
- ArrowOrientation_Bottom As String [read only]
The Arrow is on the bottom of the panel - ArrowOrientation_Left As String [read only]
The Arrow is on the lft of the panel - ArrowOrientation_Right As String [read only]
The Arrow is on the right of the panel - ArrowOrientation_Top As String [read only]
The Arrow is on the top of the panel - ArrowProperties As ASFloatingPanel_ArrowProperties
- ArrowVisible As Boolean
- Duration
Default: 150 - OpenOrientation
- OpenOrientation_BottomTop As String [read only]
Opens the panel from bottom to top - OpenOrientation_LeftBottom As String [read only]
Opens the panel from left to bottom - OpenOrientation_LeftRight As String [read only]
Opens the panel from left to right - OpenOrientation_LeftTop As String [read only]
Opens the panel from left to top - OpenOrientation_None As String [read only]
Opens the panel without slide, but with fade - OpenOrientation_RightBottom As String [read only]
Opens the panel from right to bottom - OpenOrientation_RightLeft As String [read only]
Opens the panel from right to left - OpenOrientation_RightTop As String [read only]
Opens the panel from right to top - OpenOrientation_TopBottom As String [read only]
Opens the panel from top to bottom - Panel As B4XView [read only]
- ArrowOrientation_Bottom As String [read only]
- Events:
- 1.00
- Release
- 1.01 (read more)
- Add New OpenOrientations
- OpenOrientation_None
- Opens the panel without slide, but with fade
- OpenOrientation_LeftTop
- Opens the panel from left to top
- OpenOrientation_RightTop
- Opens the panel from right to top
- OpenOrientation_LeftRight
- Opens the panel from left to right
- OpenOrientation_RightLeft
- Opens the panel from right to left
- OpenOrientation_TopBottom
- Opens the panel from top to bottom
- OpenOrientation_BottomTop
- Opens the panel from bottom to top
- OpenOrientation_None
- Add Arrow
- Add Type ASFloatingPanel_ArrowProperties
- Add New OpenOrientations
- 1.02
- BugFixes
- 1.03
- BugFixes
- Add get and set CloseOnTap
- Default: True
- 1.04
- BugFix
- 1.05
- Add get and set CornerRadius
- Default: 10dip
- Add get and set CornerRadius
- 1.06
- B4J BugFix
- 1.07
- BugFix - The function "Close" works now with CloseOnTap = False
- 1.08
- B4I Improvements - the entire screen is now used for the background shadow
- When the navigation bar was hidden, there was an area at the top that did not go dark when the menu was opened
- The height of the area is now determined and the gap closed
- B4XPages is now required in B4I
- B4I Improvements - the entire screen is now used for the background shadow
Attachments
Last edited: