i am using listview with template selector, one template is for message and one template is for writing new comment. the data template selector works fine. i am using editor for writing new comment because we want multi line comments, which works fine too its height increases if i tap enter button on keyboard.
the only issue which i am facing is the listview Item height, it is not increasing while the editor grows in height and goes outside of the view, next listview item overlaps the editor. Although listview item height refreshes and shows full editor once it goes outside the screen.
i am setting ViewCell height manually and also firing the Grid's InvalidateMeasure()
for the grid layout, but nothing helping. Any Ideas?
On android it works fine only facing it on ios.
well i have achieved the required functionality for ios using custom renderer. what i have done is subclass viewcell and when text change for my item i call the UITableView begin and end updates methods.
Answers
@StephaneDelcroix any suggestions?
well i have achieved the required functionality for ios using custom renderer. what i have done is subclass viewcell and when text change for my item i call the UITableView begin and end updates methods.
ViewCells have a method for forcing them to update size.
https://developer.xamarin.com/api/member/Xamarin.Forms.Cell.ForceUpdateSize()/
I personally recommend not to use this method, the performance is the worst I've ever seen
. Instead you could use this : https://stackoverflow.com/questions/48183532/forceupdatesize-listview-issue-on-ios Duke Y workaround
Do you have any code you can share? I think I might need to implement something similar in an expandable list view I'm working on.