Android Question Radiobutton invisible when panel child

Arf

Well-Known Member
Licensed User
Longtime User
I have read a few threads on the subject but still can't see my radiobutton.
It's the only button in a panel, the panel is set to a small area within the same sceen space as the radiobutton. Panel Alpha set to 0 for invisibility, radiobutton aplha set to 255.
I clicked 'Set to Top' on both designer elements.
Panel colour - default (same as activity),

I feel I've tried everything, but obviously haven't! Any suggestions as to what else I can try?
 

Arf

Well-Known Member
Licensed User
Longtime User
Ooops, switch those Alpha values, the 'invisible' panel is set to 255 and the visible elements to 0
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It works here. If the radiobutton is larger than it's enclosing panel, you may be just not seeing the radiobutton graphic. Try making sure that the Radiobutton size is smaller than the panel.

Edit re your second post: If the RadioButton alpha is 0 then you won't see it.
 
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Still no luck, I can see the panel (I set Alpha to 13 instead of invisible so I can at least see the positioning).
Where are some shots of the designer.
Panel:

RadioButton:

Designer Script:

Designer:
 
Upvote 0

derez

Expert
Licensed User
Longtime User
The position of the radiobutton in the designer script is relative to the panel, not the activity, so topandbottom 73% throws the radiobutton out of the panel.
 
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Thanks Derez, I tried to set the top+bottom and left and right to 0%,100% instead but still no luck.
I'm uploading a zip of a cutdown portion of my project in case anyone fancies a look because I'm making no headway.
 

Attachments

  • radiobuttondebug.zip
    9 KB · Views: 183
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Hi klaus, what did you change?
I am still not seeing the radiobutton :-(

could it be an Android 5.0 issue? I'm running on a nexus7 with android 5.0.
 
Upvote 0

derez

Expert
Licensed User
Longtime User
I tried to set the top+bottom and left and right to 0%,100% instead
100%x is the width of the activity, your panel is 60%x so I put 60%x and 7%y, which fits the size of the panel, and here it is (on android 5 emulator):
B4X:
BoostPanel.SetLeftAndRight(20%x,80%x)
BoostPanel.SetTopAndBottom(73%y,80%y)
BOOST.SetLeftAndRight(0%x,60%x)
BOOST.SetTopAndBottom(0%y,7%y)


 
Reactions: Arf
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Ah Ha! Thank you so much, I finally understand, and can see my button
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…