Android Question Rotate Label and button

Edu Chamon

Member
Licensed User
good night friends.

I have a text on a label and on a button I have a text with the number 6.

I would like to rotate 360 degrees and the text to be like 9.

I have tried to use an upsidedown font.

The idea is to split the screen in half and two people facing each other can look at the same content without turning the phone. Has as ? Thank you
 

Edu Chamon

Member
Licensed User
Good Morning. I am new to B4A. I am loving it, but these two lines get me sleepy for 2 days until 4am in the morning. Thank you very much
 

emexes

Well-Known Member
Licensed User
The idea is to split the screen in half and two people facing each other can look at the same content without turning the phone.
Use the XUI library, declare the Views as B4XView and use MyView.Rotation = 180.
For this symmetric use, you might be better to have one layout file that represents a half-screen, and another layout file that has two half-screen-sized panels. Then use the half-screen panels' .LoadLayoutFile to load the half-screen layout into both of them, and set the .Rotation of the top half-screen panel to 180 degrees.

can look at the same content
Is the content *exactly* the same?

If so, then it might be simpler to just draw the right-way-up panel only, and then use .Snapshot to grab the rendering of that panel to an image, and paste that image to the rotated panel (to the panel's background, or if that doesn't work, to an ImageView that occupies the entire upside-down panel).

My first get-it-going tack would be to have a global flag that is set whenever the master panel is (potentially) changed, and then on a 10..30 Hz timer, check that flag and do the copy if needs be.
 

Edu Chamon

Member
Licensed User
Hello people, Just to put it, it's a multiplication table game for my daughter to learn multiplication tables by playing. I

used this solution, created a label and 4 buttons and in Activity_Create I just called a function to invert and it worked.


I used the library XUI Views - V 2.11

B4X:
Sub girar(b As B4XView)
    Dim x As B4XView = b
    x.SetRotationAnimated(1, 180)
End Sub
Thank you
 

emexes

Well-Known Member
Licensed User
Looks good.

Is it played by two people at the same time? Are you allowed to be competitive? Here school is a bit every-child-is-a-winnner and they'd probably frown on turning it into a race, but... maybe you could have an option for an icon that starts in the middle, and moves towards whoever is answering accurately and quickly. Could/should be handicapped so that the slower player still has a 25% chance of winning. Unicorns and sloths are currently popular here with times-tables aged kids. Well, girls, anyway. Boys are more into explosions.

:)
 

emexes

Well-Known Member
Licensed User
Another thing that might help some kids get a grasp on the numbers might be an option to have a picture of dice faces under the numbers, while the numbers are all <= 6. Or to bring the dice faces from invisible to visible after a few seconds of no answer.

⚀⚁⚂⚃⚄⚅

Then again, looking at those Unicode dice, might be better off with just the dots, no outline.



 

Edu Chamon

Member
Licensed User
Cool. The idea is not to have a competition, but to play together, so they cheer each other up. But I'll talk to her teacher and see what she thinks. thanks for putting
 

Edu Chamon

Member
Licensed User
Emexes
Good morning, after your comment, I changed.
Now each one plays once and in the end, both win. thanks for the remark
 
Top