new

exi1e

New Member
Licensed User
Longtime User
ok so i am new to programming droid stuff.
i am experimenting with a dice roller.
i have buttons set up and did the first sub for the first button click, but cannot figure out how to print the result to the screen, i thought it was log command but that just prints it to the log any help is appreciated
 

JonPM

Well-Known Member
Licensed User
Longtime User
You can use MsgBox or ToastMessageShow. Or create a Label and set the text to the result. Depends what you need...
 
Upvote 0

joseluis

Active Member
Licensed User
Longtime User
You could add a label to the activity, and change the text of that label.

I recommend you to download the beginers guide, and to do at least the first example program to get the hang of the basics on how android GUI works.
 
Upvote 0

ggpanta

Member
Licensed User
Longtime User
You have numerous options to do that.

Firstly the easiest way (but not so nice) you can either use

B4X:
ToastMessageShow(diceResult,False)

or

B4X:
MsgBox("Dice Result",diceResult)

then you have the more elaborate ways ie create a panel and a label and show the result there, this way you have absolute control over the appearance.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…