ListView Problem

mjtaryan

Active Member
Licensed User
Longtime User
I have an app with a LIstView as a sort of table of contents. On smaller screen devices the text size is uncomfortably small. To remedy that I've used the MultiLineTextSize method in StringUtils to find a reasonable text size for the screen size. In doing so, on the smaller screen devices, not all of the ListView's items can be displayed. So, I've been trying to eembed the ListView in a ScrollView.

The problem is, now, with the ScrollView as the parent rather than the activity, the ListView is no longer visible. I have no idea why? I can't post the code because, with all my troubleshooting efforts, the code is a visual mess that only I can make sense of. So, my initial question is what are the things that could be causing this? Knowing these things will enable me to eliminate them from the causes. Note: I've tried the obvious such as making sure the ListView is visible andd enabled. Thanks.
 

mjtaryan

Active Member
Licensed User
Longtime User
,
You shouldn't put the ListView inside a ScrollView. Why is it needed?

As I explained in the original post, so all the items in the ListView can be displayed on smaller screens where the trxt size is not truly accessible,, which is important. If you have other suggestions, I'd welcome them. Thanks.
 
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
Not sure that I understand. Are you using a HorizontalScrollView? ListView is already a scrollable view.

No the scrolling I want to achieve is vertical but that was not working on the smaller screens (i.e. 3.5 inch 320x480). The bottom two to four items in the list are not visible and the screen doesn't scroll or, If It does, there is a wide break at the bottom with the underlying parent panel (both have shown up in testing.
 
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
There shouldn't be a problem scrolling ListView. Make sure that the ListView is not larger than the screen.

Okay, I returned the ListView to the way I had It originally, which is the ListView on a Panel (the PPanel is the parent). Both where created in the Designer and a script is used to set the dimensions such that the ListView is the same as the Panel.

The first attached image is the actual ListView with the text replaced because its proprietary. The second image is what occurs when I try to scroll the ListView.
 

Attachments

  • ListView.png
    ListView.png
    27.6 KB · Views: 190
  • ListView Sceoll.png
    ListView Sceoll.png
    13.6 KB · Views: 202
Upvote 0
Top