Hi everyone! Happy holidays!
Does anybody know how to implement generic chat view in Xamarin.Forms, just like that -- random screenshot:
Well, more specifically, the first challenge here a is variable height cells with bubbles. I got more questions than answers about it
I have an initial idea to use ListView
for that. Then I will need to implement native interfaces for iOS and Android to pre-calculate height for label. On iOS we have [NSString sizeWithAttributes:]
, on Android we have TextView.Measure()
. I will need to ensure that proper fonts are used for measurement and maybe have some fake controls, etc. Not really nice, but it seems to be working idea.
Is there a better approach for this case?
Does anybody know about good 3rd party libs or components that can help here?
Cheers!
UPD: Here's a closely related discussion about auto-height for cells in ListView
.