Android Question Auto WebView Size

luke2012

Well-Known Member
Licensed User
Longtime User
Hi all,
I searching for a solution to implement an auto WebView height (and auto label) size for B4X (see the attached images).
Searching the Forum a found this Samples (by @Erel and by @Alexander Stolte) :

[B4X] [XUI] Accurate Text Measurement and Drawing

[B4X] [XUI] AutoTextSizeLabel

In one case I have a webview (see page_example1 and page_example2) in the other case I have a label with multi-line text.

Generally the purpose of my implementation is to create a label and a webview that have fixed width and variable height. The label and WebView height is resize to the last text line in order to show all contained text.

When I add a new text line with fixed text size the label should increase the it height in order to display the new added lines. Is there any available sample for B4X or any suggestion to implement this?

Thanks in advance for your help?
Luca.
 

Attachments

  • page_example1.png
    page_example1.png
    267.6 KB · Views: 225
  • page_example2.png
    page_example2.png
    293.6 KB · Views: 200
  • label.png
    label.png
    40.8 KB · Views: 177
Last edited:

Biswajit

Active Member
Licensed User
Longtime User
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User

Thanks for your suggestion :)
My App is a B4X app and than I have to implement this also for B4i.
 
Upvote 0

Biswajit

Active Member
Licensed User
Longtime User
Thanks for your suggestion :)
My App is a B4X app and than I have to implement this also for B4i.
Done. Check the same thread.
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Done. Check the same thread.

Thank you! I'll try :)
 
Upvote 0
Top