iOS Question TableCell transparent

Discussion in 'iOS Questions' started by Alberto Iglesias, Apr 15, 2015.

  1. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Anyone knows how to put the tablecell and tableview transparent?

    Only for appears the customitens in tablecell.

    in the CreateItem I try put in panel p.color= colors.transparent and p.alpha but the customitens inside the panel going transparent too.
    Code:
    Private Sub CreateItem As Panel
        
    Dim p As Panel
        p.Initialize(
    "")
        p.Width = 
    100%x
        p.Height = tv.RowHeight - 
    20dip
        p.LoadLayout(
    "1")
        p.Color = 
    Colors.ARGB(0,50,50,50)
        
    'p.Alpha = 0.3
        Return p
      
    End Sub
    [code]
     
    Last edited: Apr 16, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    Don't change the Alpha level. Only set p.Color = Colors.Transparent.
     
  3. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Not working with Colors.transparent, I try in tableview and tablecell (with and without customcell)

    I need create a simple listview with this effect:

    One activity with background and listview transparent

    [​IMG]
     
  4. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Somebody know or have an example to to a simple tablecell transparent but now the Label inside?

    Thanks

    Alberto
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    You can use CustomListView instead. It will you fill control over the looks.
     
  6. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    I tried first then listview, but not working, look:

    Code:
    Sub CreateListItem(Imagem As String, Codigo As String, Descricao As String, Width As Int, Height As Int) As Panel

        
    Dim p As Panel : p.Initialize("") : p.Color = Colors.transparent
       
        
    Dim imgIcone As ImageView : imgIcone.Initialize("imgIcone") : imgIcone.Bitmap = LoadBitmap(File.DirAssets, Imagem)
        p.AddView(imgIcone, 
    5dip2dip48dip48dip)

        
    Dim lblDetail As Label : lblDetail.Initialize("lblDetail"): lblDetail.TextAlignment = lblDetail.ALIGNMENT_LEFT : lblDetail.Text = Descricao : lblDetail.Font =              Font.CreateNew(12) : lblDetail.TextColor = Colors.Red  
        lblDetail.Multiline = 
    True
        lblDetail.AdjustFontSizeToFit = 
    True
        p.AddView(lblDetail,  
    60dip5dip280dip23dip)

        
    Dim lblCodigo As Label : lblCodigo.Initialize("lblCodigo"): lblCodigo.TextAlignment = lblCodigo.ALIGNMENT_LEFT : lblCodigo.Text = Codigo : lblCodigo.Font =   Font.CreateNew(12) : lblCodigo.TextColor = Colors.Blue  
        p.AddView(lblCodigo,  
    60dip20dip280dip40dip)
       
        
    Dim imgBadge As ImageView : imgBadge.Initialize("imgBadge")
         p.AddView(imgBadge, 
    320dip25dip24dip24dip)

        
    Return p
       
    End Sub
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    If you can please create a small project based on CustomListView and upload it.
     
  8. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Look this minimal example with customcell and panel transparent....
     

    Attached Files:

  9. Erel

    Erel Administrator Staff Member Licensed User

    Open CustomListView class and change sv.color:
    Code:
    sv.Color = Colors.Transparent
     
  10. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    and in a Listview wrapper?
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    You cannot do it with TableView.
     
  12. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    No. i´m refer the tableviewcell like this example I do with Xcode and put in the cell.
     
  13. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    For CustomListView works perfectly!

    Thanks Erel..
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice