Android Question xCustomListView - set horizontal orientation programatically?


I've been migrating from loadLayout to programatically creating it (only in my clv, as I've measured the times and it's definitely faster). But the problem is that in the vertical CLV I'm putting nested horizontal CLVs inside. Loading it with designer made no problems, but I've realized that orientation parameter exists only in designer and I can't do it from code (something like: priv x as customlistview, then set x.Orientation= ...). I am NOT doing it during list runtime. I only want to change it before the list is actually added to any parent. Is there any way? For now a quick workaround is importing the CLV using LoadLayout and the rest of items manually, but for some reason the list doesn't want to scroll then. There's no scrollbar etc. (edit: Base_Resize function did the job and for some reason it has the exact layout but now works)

TL;DR: Set CLV orientation to horizontal programatically? Only once, and not during it's runtime
Last edited:
It is not possible.

What you can do is have two layout files with a single CLV. One horizontal and one vertical, and load the required one at runtime.


Thanks Erel, that's how I've done it for now. Are you planning to make it possible to fully initialize and setup a CLV with code in future? That's not needed of course because loading up a single view designer file is very fast, and if I've noticed correctly they "cache" somewhere or something if you load the same layout consecutively multiple times
Upvote 0