I created a new custom view where the user continues to run the application based on the information displayed in the tiles. There are three types of information that can be displayed:
The tiles are scrollable. The width of the tiles can be fixed or flexible. Each tile is assigned a unique tag, which is passed in the Click event when clicked. Examine the example.
Tiles_JE
Author: Jerryk
Version: 1.8
Methods:
Sets or gets the selected tile. The tag name is used.
Events:
- Click (pId As String, pTag As Object)
Raised when tile is cliked.
Properties:
FilledWidth -
TileWidth is ignored, width is calculated based on
Tiles Per Row
FixedWidth -
Tiles per row is ignored, actual width is used
Tile height
Tile width
Tile radius
Gap distance
Number of tiles per row
Background Color for tiles
"border" - if the tile is selected, border is drawn in color SelectedColor
"tile" - if the tile is selected, background is drawn in color SelectedColor
"off" - the tile is not redrawn
Borded Color
- SelectedBorderWidth As Int
Borded width
- ShowDefaultBorder As Boolean
Draw default border for tiles
Color for default border for tiles
Width of default border
Center Images, default True
Functions:
- AddLabel (pId As String, pText As String, pSize As Int, pBackgroundColor As Int, pTag As Object) As Label
Add tile with label
- AddImage (pId As String, pBitmap As String, pBackgroundColor As Int, pTag As Object) As ImageView
Add tile with image as-is
- AddImageResize (pId As String, pBitmap As String, pBackgroundColor As Int, pWidth As Int, pHeight As Int, pTag As Object) As ImageView
Add tile with image nad resize
- AddLayout (pId As String, pLayout As String, pBackgroundColor As Int, pTag As Object) As Panel
Add tile with layout
- FindTile (search As String) As Panel
Find a tile with a specific tag
- DefaultColor (pTag As String, pCol As Int)
Change default tile color for tile with a specific tag
- AddToParent (Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)
Add class programmatically
Gets Base of the object
redraws tiles after changing a property
- DeleteTile (pTag As String)
delete tile
sets the view height according to the total height of the tiles
center view horrizontally