Android Question customlistview set panel view


Licensed User
Dear all,

I am working with a customlistview with severla edittextboxes, buttons etc. when entering from one editbox to another, I want to make from the enterpressed command on the last textbox that he jumps to the first of the following panel.

There is a getpanel command but is there also a set panel command?

I use the fieldorder command of steve05 and this works perfectly. I set it on repeat and it starts at the front again but of the same panel. When I set it to false, it stops (logically).

I have seen the commnad, jumptoview and scrolltoview. this does not seem to do anything but that is probable because I only have 3 panels and there is nothing to scroll…. But it does not activate the panel, only scroll to it, isn't it?


Staff member
Licensed User
You don't need a SetPanel method.

All that you need is:
Sub Activity_Create(FirstTime As Boolean)
   For i = 1 To 20
       Dim p As B4XView = xui.CreatePanel("")
       p.SetLayoutAnimated(0, 0, 0, 100%x, 80dip)
       p.GetView(0).Text = i
       CLV1.Add(p, "")
   Dim acc As Accessiblity
   acc.SetNextFocusDown(p.GetView(0), CLV1.GetPanel(0).GetView(0))
End Sub
Cell is a layout file with a single EditText.
This code is based on xCustomListView.


Licensed User
hi Erel,

Sorry, I am still a newbe...I used the customlistview code and try to do what you suggested but nothing changed.. did I do it correct?

in the next script I got data from a csv file and putting them in the panels. Row(0 to 1) I added to the stndard createlistitem script to implement the tekst in the editboxes that i put in the panel.

 For i = 0 To List1.Size - 1
     Dim Row() As String
     Row = List1.get(i)
     Dim pnl As Panel = CreateListItem($"Item #${i}"$, clv2.AsView.Width, 70dip,Row(0),Row(1),Row(2))
     clv2.Add(pnl, 70dip, $"Item #${i}"$)
 Dim acc As Accessiblity
 acc.SetNextFocusDown(pnl.GetView(0), clv2.GetPanel(0).GetView(0))
ps, it is a numeric edittextbox. Does the enterpress also generate a down key?
Last edited: