B4A Library [Lib] Sliding Dashboard

This library will create a Sliding Dashboard.

Requirements:

- B4A 2.5x.
- The Dashboard library.
- Copy the DashboardPulltab.png to your assets directory.

How to install:

- Copy the SlidingDashboard.jar and SlidingDashboard.xml to your additional libraries directory.

How to use:
B4X:
'Initialize the library
Dim Dashboard As SlidingDashboard

'Create the SlidingDashboard
Dashboard.Initialize(Activity, Me, "TileClicked", Colors.White, "", 80%x, 80%y, "R")

'Add some tiles to the SlidingDashboard
Dashboard.AddTile(Image, 120dip, 100dip, 1)
Dashboard.AddTile(Image, 120dip, 100dip, 2)
Dashboard.AddTile(Image, 120dip, 100dip, 3)

'Capture the tile clicked
Sub TileClicked_Click(Tile As Object)

    ToastMessageShow("Tile clicked = " & Tile, False)

End Sub
Notes:

- The tiles added will have the same size, this is due to the way the dashboard works.
- This library supports up to 20 tiles (graphics only).

Screenshots:
Y7bfor6l.png
-
Sxjb36Cl.png
 

Attachments

  • SlidingDashboard_Lib_1.0.zip
    4.9 KB · Views: 779
  • SlidingDashboard_Sample.zip
    25.5 KB · Views: 770

aaronk

Well-Known Member
Licensed User
Longtime User
Good Job, I like it..

The only things I have noticed is:

If my arrow button is on the right of the screen (pointing left) and I press it the dashboard comes up fine, however the arrow is still pointing to the left. How can you make it so that the arrow then points to the right to close it?

Can you make it so that you can load a layout rather than a image ?

Also, I have noticed that if you have more than 6 images it doesn't allow you to scroll and it cuts them off.

Other than that, I like it and can see me using this in my next app. but would need to be able to load a layout rather than images.
 

NJDude

Expert
Licensed User
Longtime User
If my arrow button is on the right of the screen (pointing left) and I press it the dashboard comes up fine, however the arrow is still pointing to the left. How can you make it so that the arrow then points to the right to close it?
It could be possible, but that will add more "tab" pictures.

Can you make it so that you can load a layout rather than a image ?
The purpose of this lib is to used it as a quick way to show tiles and be used as shortcuts.

Also, I have noticed that if you have more than 6 images it doesn't allow you to scroll and it cuts them off.
A dashboard doesn't allow scrolling, you will have to load smaller pictures or define a smaller size.
 
Last edited:

aaronk

Well-Known Member
Licensed User
Longtime User
What about adding a Label on top of the image?

This way I can dynamically add text to each button and will save me creating 6 different button images, and I can just have the one image but change the text for each of them.
(I want the user to be able to name the button to what ever they want and using this dashboard will be ideal way for what I am trying to do.)
 

metrick

Active Member
Licensed User
Longtime User
NJDude:
I got compile error. "A referenced library is missing: adhasboard"
 

ciprian

Active Member
Licensed User
Longtime User
Hi there, nice lib. I was wondering how to change the dashboardpulltab.image, to have the opposite arrow when opened.
 

johndb

Active Member
Licensed User
Longtime User
This is a very nice library. I have tried using multiple dashboards, one on either side of the screen and it appears to work fine but it would be great if you could specify the tab location so that you can have various tabs stacked on one side. Additionally, it would also be great if you could specify the tab image for each instance thereby allowing unique images for each tab or preferably define a text label for the tab?

John
 

GMan

Well-Known Member
Licensed User
Longtime User
Hoi NJDude,

i got an error (NullPointerException) after starting the selected activity:

B4X:
Sub TileClicked_Click(Tile As Object)
Select Tile
Case 1
  StartActivity(MySub_Click)
End Select
End Sub

Sub MySub_Click
Activity.RemoveAllView
Activity.LoadLayout("myLayout")
End Sub

Also this causes the same error:
B4X:
If Tile = 1 Then
    Activity.RemoveAllViews
    Activity.LoadLayout ("myLayout")
End if


Where is my mistake ?
 
Last edited:

JakeBullet70

Well-Known Member
Licensed User
Longtime User
NJDude, are you done developing this?
If so, I would love to get the source code and do so more work on it and share it back?
 

GMan

Well-Known Member
Licensed User
Longtime User
+1
 
Top