Android Question It is possible to configure an item of a ListView as disabled ?

Sergio Castellari

Active Member
Licensed User
Okay
How do I replace the current ListView with xCustomListView? I currently have this code when creating it:

B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    'load the layout to Root
    Drawer.Initialize(Me, "Drawer", Root, 250dip)
    Drawer.CenterPanel.LoadLayout("Botonera")
    Drawer.LeftPanel.LoadLayout("MenuPrincipal")
    'B4XPages.SetTitle(Me,"GestionAPP")
    HamburgerIcon = xui.LoadBitmapResize(File.DirAssets, "hamburger.png", 32dip, 32dip, True)
    ListView1.SingleLineLayout.Label.TextSize = 16
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF155)).PopAll.Append("  Caja ") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF2BA)).PopAll.Append("  Clientes") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF1B9)).PopAll.Append("  Proveedores") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF085)).PopAll.Append("  Configurar") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF204)).PopAll.Append("  Salir") )
Y este diseño:
ListView.png


And then I perform the following operations:

B4X:
Sub ListView1_ItemClick (Position As Int, Value As Object)
Select Position
  Case "0" 'Clientes
        'StartActivity(Clientes)
  Case "1" 'Proveedores
        'StartActivity(Provedores)
  Case "2" 'Caja
        'StartActivity(Caja)
  Case "3" 'Parametrizar APP
        'StartActivity(Configuraciones)
  Case  "4"  'Salir de la APP
    Wait For(Main.Func.SalidaDeAPP) Complete (lResp As Boolean)
        If lResp = True Then
            Wait For (Main.jConex.AuditSQL("Salio del Sistema","A")) Complete (lResp As Boolean)
          Wait For (Main.jConex.UsuarioActivo(2)) Complete (lResp As Boolean)    'Elimino registro de Usuario concurrente
            ExitApplication
        End If
End Select
End Sub

And finally: How can I mark some items as disabled?
Greetings and thanks
 
Upvote 0
Top