Android Question slv swipe custom design

Schakalaka

Active Member
Licensed User
Longtime User
Hello,
i have add the swipe to a clv, but i dont' like the design result. it is a bit bigger then clv panel

I have use this code:

B4X:
CvlMovTot.Add(CreateItem(img,mov_descrizione, mov_categoria, mov_data, mov_conto, mov_importo, mov_beneficiario),Swipe.CreateItemValue("", Array("close operation")))

CreateItem code is:
B4X:
Private Sub CreateItem(imgg As String,descrizione As String, categoria As String, data As String, conto As String, importo As String, debitore As String) As Panel
    Dim p As B4XView  = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, CvlMovTot.AsView.Width, 145dip)
    p.LoadLayout("pag1SlideMenu")
    AjustaImageView(ImageView1,imgg)
    Label1Name_fruit.Text = descrizione
    Label4Price.Text = importo & " €"
    Label3kg.Text = data
    Label2Calories.Text = categoria
    lblconto.Text = conto
    lbldebitor.Text = debitore
    Swipe.Base.LoadLayout("clv_swipe")
   
    If categoria <> "Generale" Then
        lbldebitor.Visible = True
       
    Else
        lbldebitor.Visible = False
        Label4Price.Left = 55%x
    End If
   
    AjustaImageView(ImageView1,imgg)
   
    Return p
End Sub


is it possible to define a custom design and load it with the code:
B4X:
swape.base.loadlayout("")
?

after that i ìm not able to call, for example a label, inside the clv item

thank you
 

Schakalaka

Active Member
Licensed User
Longtime User
ok, thank, I?m thing more about resize it at same size of the other panel.
also, how to add it to this code?

B4X:
    Dim p As B4XView  = xui.CreatePanel("")
            p.SetLayoutAnimated(0, 0, 0, CvlMovTot.AsView.Width, 145dip)
            CvlMovTot.Add(p,CardItem)
where "CardItem" is a customtype
I don't know where put this part of code:
B4X:
Swipe.CreateItemValue("", Array("Action 1", "Action 2", "Action 3"))
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…