Android Question xCustomListView backcolor

Discussion in 'Android Questions' started by yaniv hanya, Jul 30, 2019.

  1. yaniv hanya

    yaniv hanya Active Member Licensed User

    Screenshot_2019-07-30-17-20-06.png
    The attached image has two xCustomListView
    I try to have both transparent backs.
    In the designer they aim for black color and transparency 0.
    And still one opaque black and one white as you can see.
    How do I fix it?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    How are you adding the items? If you have layouts for the items then make sure that the main "activity" color is also transparent.
     
  3. yaniv hanya

    yaniv hanya Active Member Licensed User

    This is one screen that all controls are configured and placed by the designer.
    The activity has a background image (the green blue cloud background in the picture above) that I expect to see behind the lists
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Are you adding the items with CLV.AddTextItem?
     
  5. yaniv hanya

    yaniv hanya Active Member Licensed User

    No.
    It is added by

    Code:
    Dim vi As itemValues
            vi.Initialize
            tempCLV.Add(CreateItem(f,vi),vi)

    Sub CreateItem(f As ExternalFile,vi As itemValues) As B4XView
        
    Dim p As B4XView=xui.CreatePanel("")
        p.SetLayoutAnimated(
    0,0,0,100%x,40dip)
        p.LoadLayout(
    "fileListItem")
        vi.ef=f
        vi.cb=addFileCb
        vi.lb=fileNameLb
        fileNameLb.Text=f.Name
        
    If f.IsFolder Or IsImageFile(f.Name)=False Then
            vi.cb.Visible=
    False
            vi.cb.Enabled=
    False
        
    End If
        
    Return p
    End Sub
    This is a layout with a label and a checkbox that appears if it's an image file so the user can select it for copy
    this is way you don't see it in the picture because there are only folders there.
    And the layout and the checkbox and label are also set to be transparent
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Check the background of the "activity" in this layout (fileListItem). Make sure that it is transparent.
     
  7. yaniv hanya

    yaniv hanya Active Member Licensed User

    upload_2019-7-31_11-39-7.png
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Two things to check in the layout with the CLVs:

    1. The divider color. This is also the scroll view color. Should be transparent.
    2. The base background color.

    [​IMG]

    It will look a bit different in your version.
     
  9. yaniv hanya

    yaniv hanya Active Member Licensed User

    Thanks .
    Now that's great.
    The divider color was the problem.
     
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