Android Question Add line on the top of a listview

Fillmore

Member
Licensed User
Longtime User
Hi Guys,

Does it have a simple way to add the last line on the top of a listview ?

Thanks a lot !

FM
 

udg

Expert
Licensed User
Longtime User
Hi FM,

did you try the sequence: GetItem, RemoveAt, Addxxx ?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Please find attached a quick and dirty solution using ListView.
Its goal is just to show that it could be done with LW alone, but as Erel pointed out the CustomListView is much more powerful.

Edit: added another example where, at each click on the list, the last item becomes the first one.
 

Attachments

  • ListTest.zip
    11.1 KB · Views: 186
  • ListTest2.zip
    11.2 KB · Views: 194
Last edited:
Upvote 0

Fillmore

Member
Licensed User
Longtime User
Thanks everybody !

I've tried custom list view and used "InsertAtTextItem" (uploaded)

There is a problem with the lines between the items.

Is it my fault ? ;-)


Thanks again.


Have a good Sunday.

FM

(and sorry for my english, I feel better in French)
 

Attachments

  • test insertattestitem.zip
    9.9 KB · Views: 221
Upvote 0

Fillmore

Member
Licensed User
Longtime User
I have attached my project in the post N° 6

The three last lines become very height. When I click on it, the line become normal...

Attached two Screenshots before click and after click.

I don't know what's wrong...


before click :

big lines.png




after click :

after click lines.png


Thanks.

Fred
 
Upvote 0

James Chamblin

Active Member
Licensed User
Longtime User
For some reason, if you set the background color on the Designer, it will only render at the default 50dip. If you uncheck the color box under Drawable and use Default, then it will work.
 
Upvote 0

James Chamblin

Active Member
Licensed User
Longtime User
Ok, I have a fix for this. In the CustomListView.bas file, go to line 139 and remove the p.Background = sd. Then go to line 171 and replace the p.background = sd between the End If and sv.Panel.Height lines. Now the CustomListView drawable properties in the Designer will work properly.
 
Upvote 0
Top