Android Question Guess My Number for B4A

MicroDrie

Well-Known Member
Licensed User
Longtime User
One of Erel's examples for the BCTextEngine / BBCodeView library is the B4J Guess My Number example. This contains the B4J TextField. However, I cannot find any example with a text input field under B4A on this site. Is that possible under B4A and how do I do it?
 

Attachments

  • B4A_BBCodeQuestion.zip
    9.3 KB · Views: 182

Erel

B4X founder
Staff member
Licensed User
Longtime User
The biggest mistake is that BBCodeView is not anchored to all sides. A layout without anchors is a broken layout.
The second mistake is that you are creating a light theme but the main app theme is still set to a dark theme.
Change in the manifest editor:
B4X:
CreateResourceFromFile(Macro, Themes.LightTheme)

The last mistake is that you are not setting the view size:
B4X:
    BBCodeView1.Text = _
$"[Color=#ff0000]Hello world!
Please enter your number (1 - 100): [vertical=10][view=txtInput Width=80 Height=50/][/vertical]
[b]Hello[/b] [url]world![/url][/color]"$
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Thx's Erel ?, A silly overlooked mistake ? from me.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…