First of all, I would like to take the time and thank everyone for helping out the noobs like me. I spent a considerable amount of time browsing through the forum and reading past issues that were resolved.
Now i only know python and partially, and for that reason adapting myself to basic4android might take some time. Anyways,
I have many problems:
1) I am trying to set 2 conditions in a If statement
In python i would write
Unfortunately, this does not seem to work.
So I tried to do the following instead:
But then what happens is that the second If statements overlaps with the first one. In other words, the second if statements does not execute properly.
2) Random Positions
I have an item, and want it to be placed at random places on the screen, but specified random places. Here's what i mean,
The first random for left and top shows that it will appear within that area, while the second random for left and top shows it will appear within another area. However, when my app launches it will appear at one of those two area (or more if i add more random).
3)Hide Keyboard
After the user type the number in the box, i want to keyboard to automatically disappear when they click on the submit button, without them having to hit the back button and keyboard will only reappear when they click on the text box again, and disappear once they click on the submit button.
For some reason, the Phone.hidekeyboard suggested by your peers doesn't seem to work for me. I am running on v2.3 and do not seem to have the Phone library (Phone is red and not blue). I do not know how to get Phone to work, or if there's any alternative.
3.5) Adding a timer to type something
Let's say, at a level, i want the user to have only 10 seconds to type something, or else the keyboard disappear and they lose a point. I know how to handle the point system, just that i do not know how to time the keyboard.
4) How do i change the look of the message box?
That is, from the standard look that is based on the user phone design, to a more unique one that will look the same for everyone. For example, message box with blue color as background, or something like that. Later on change the look of the message box to reflect the visual design of the level. Would it be possible to do the same with the keyboard?
5) Changing the color of the text box field
By default, it is white. But lets say i want to change it to something more vibrant like green, would that be possible?
6) What is the code to play music as a background in my app?
I would also use that code to play a different music, at a different level.
I thank in advance everyone who takes the times to try and assist me on many of my problems.
:sign0163:
Now i only know python and partially, and for that reason adapting myself to basic4android might take some time. Anyways,
I have many problems:
1) I am trying to set 2 conditions in a If statement
In python i would write
B4X:
If x = 6 or x < 10 #execute the following
So I tried to do the following instead:
B4X:
If x = 6 Then
Msgbox("something", "title")
Activity.LoadLayout("level2")
If L_Points = 10 Then
Msgbox("something", "title")
Activity.LoadLayout("special")
End If
End If
2) Random Positions
I have an item, and want it to be placed at random places on the screen, but specified random places. Here's what i mean,
B4X:
item.Left = Rnd(100, 105) OR Rnd(10, 11)
item.top = Rnd(0, 10) OR Rnd(15,30)
3)Hide Keyboard
After the user type the number in the box, i want to keyboard to automatically disappear when they click on the submit button, without them having to hit the back button and keyboard will only reappear when they click on the text box again, and disappear once they click on the submit button.
For some reason, the Phone.hidekeyboard suggested by your peers doesn't seem to work for me. I am running on v2.3 and do not seem to have the Phone library (Phone is red and not blue). I do not know how to get Phone to work, or if there's any alternative.
3.5) Adding a timer to type something
Let's say, at a level, i want the user to have only 10 seconds to type something, or else the keyboard disappear and they lose a point. I know how to handle the point system, just that i do not know how to time the keyboard.
4) How do i change the look of the message box?
That is, from the standard look that is based on the user phone design, to a more unique one that will look the same for everyone. For example, message box with blue color as background, or something like that. Later on change the look of the message box to reflect the visual design of the level. Would it be possible to do the same with the keyboard?
5) Changing the color of the text box field
By default, it is white. But lets say i want to change it to something more vibrant like green, would that be possible?
6) What is the code to play music as a background in my app?
I would also use that code to play a different music, at a different level.
I thank in advance everyone who takes the times to try and assist me on many of my problems.
:sign0163: