Android Question xCustomListView not showing scrollbars

techknight

Well-Known Member
Licensed User
Longtime User
I have noticed when using xCustomListView, that it isnt showing scrollbars.

Neither in horizontal, or vertical mode that the scrollbars show, so when I, or another person is looking at the app, they cant tell that its actually a scrollable list.

I went in the designer and set the scrollbars to true.

I am using the class and not the built-in library, so I am not sure what to do next? any ideas?
 

techknight

Well-Known Member
Licensed User
Longtime User
Because I am confused? I saw the xCustomListView on the forum and it had the library as a class?

Also the class says 1.65 and the library says 1.63 so I am not sure if that means anything either?
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I removed the class and went back to the standard library, same thing.

Here is how I am setting it up in a test like fashon:

B4X:
    'Globals
    Dim lstQuickHits As CustomListView
    Dim lstHeadShots As CustomListView

    'Copied from my init routine
    pnlQuickHitsLayout.LoadLayout("QuickHitsLayout.bal")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "1")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "2")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "3")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "4")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "5")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "6")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "7")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "8")
    lstQuickHits.Add(CreateListItem("Test", 180dip, lstQuickHits.AsView.Height), "9")


'My test sub, taken from the example and changed a bit for testing.
Private Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel
    Dim p As Panel
    p.Initialize("")
    p.SetLayout(0, 0, Width, Height)
    p.LoadLayout("ItemPanel2")
    imgThumbnail.Bitmap = LoadBitmap(File.DirAssets, "thumb.png")
    lblName.Text = "Fouled Out.wmv"
    lblDescription.Text = "Duration: 00:04"
    Return p
End Sub

Everything technically is working, I can thumb scroll through the list. But there are no scrollbars.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Also the class says 1.65 and the library says 1.63 so I am not sure if that means anything either?
No need to guess. You can see the change log here: https://www.b4x.com/android/forum/t...listview-cross-platform-customlistview.84501/
V1.64 and 1.65 contain fixed related to B4i only.

My guess is that the theme colors hide the scrollbar. What is the list color? If it is white then make sure to use a light theme:

B4X:
CreateResourceFromFile(Macro, Themes.LightTheme)
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I am using an "adobe like" theme, everything is all shades of gray, Except for green control buttons, and red outlines in certain areas.

Here is my theme in the manifest:
B4X:
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.NoActionBar">
        <item name="colorPrimary">#0098FF</item>
        <item name="colorPrimaryDark">#007CF5</item>
        <item name="colorAccent">#ADFF2F</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
    </style>
</resources>
)

As far as the control itself, I have this:
Divider color: FF343331
Pressed Color: FFD9D7DE
Text color: Default (not using text, using layouts/panels)
Base Background Drawable Color: 4D4B4C
Alpha: 255
Border color: FF343331
Border Width: 5
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I See the scrollbar now. its really really super thin. Need a magnifier. Also appears to be the same color as the dark accent of the list as you had mentioned. So I have to fix that somehow.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I am trying to figure it out. It has to be something I am doing or someone else would have had this issue.

If I continue to have the issue, I will try and upload an example.
 
Upvote 0
Top