Uf, maybe I was not precise enough... I want to add new functionality to GridView; when user use "longclick" on some record in grid, system will open "left menu" - like this:One solution if I understand correctly ...
Add a Spinner to the Column Cells ....
See this thread ... replace the ImageView / Flag with your spinner.
[B4X] B4XTable with custom cells layout
Requires B4XTable v1.01+: https://www.b4x.com/android/forum/threads/b4x-b4xtable-cross-platform-sortable-searchable-customizable-table.102322/#content This example demonstrates the steps required to create cells with custom layouts. Each cell in B4XTable is made of a Panel with a Label. The...www.b4x.com
Sub B4XTable1_CellLongClicked (ColumnId As String, RowId As Long)
Dim visibleRowID As Int = B4XTable1.VisibleRowIds.IndexOf(RowId)
pnlMenu.Visible = True
pnlMenu.SetLayoutAnimated(0, 100dip, 140dip +(visibleRowID * 42dip) , 100dip, 100dip) 'Top value .. 140dip for header height
End Sub
Thanks ... Have you any example with panel? What should be a part of panel? Fixed text or grid? I need to add more (5 - 8 "lines" to menu)...For the Menu .. possibly just some labels added to a panel
You could calculate the top position from VisibleRowID ... but unsure of method to calculate left position. (especially if user starts scrolling)
* but you would also have to allow / recalculate if user long clicks last few rows ..
B4X:Sub B4XTable1_CellLongClicked (ColumnId As String, RowId As Long) Dim visibleRowID As Int = B4XTable1.VisibleRowIds.IndexOf(RowId) pnlMenu.Visible = True pnlMenu.SetLayoutAnimated(0, 100dip, 140dip +(visibleRowID * 42dip) , 100dip, 100dip) 'Top value .. 140dip for header height End Sub
Have you read the Guides and tutorials... further down is a link for Video Tutorials as well.Thanks ... Have you any example with panel? What should be a part of panel? Fixed text or grid? I need to add more (5 - 8 "lines" to menu)...
I'm new with android programming, so - need more help...![]()
Clear...Have you read the Guides and tutorials... further down is a link for Video Tutorials as well.
B4A Documentation
www.b4x.com
I have attached a small example that supplies a menu on Long_Click of the first Column cells. It has been restricted to the first column only.
Adapt it to your needs. It has been commented well.
I have not tested the accurate positioning of the menu across devices.
I have seen an example of balloon shaped panel / view in the forum if that interests you. (Have not searched)
There is probably other views that could be used as a menu as well.