Android Question Why can not change or adjust the position of the views in a panel?

Frank660405

Member
Licensed User
Longtime User
pls see the picture bellow:

the raadio button were covered by the labels in the 3 panels. however i change the left, right value of both radio buttons and labels, the position of them can not be changed.

the radios are left=3, width=25, hight=25. and maybe they are not covered, even I remove the label beside, it behaviors the same.

why?

pls help and thaanks in advance!

upload_2018-9-15_11-38-1.png
 
Last edited:

Semen Matusovskiy

Well-Known Member
Licensed User
1) It's better to upload a sample, which demonstrates a problem. There is useful menu item in IDE - File, Export to zip.

2) What' s can be wrong ... I can assume only. In your case all child elements (radio buttons, labels) must have Panel as Parent.
If something has Activity as parent, it will be problems, because Left/Top are relative to parent view, not to screen.
 
Upvote 0

Frank660405

Member
Licensed User
Longtime User
thank you all. but sorry for zip's coming late.

pls double check and give me the instruction.
 

Attachments

  • C2C.zip
    327.1 KB · Views: 171
Upvote 0

klaus

Expert
Licensed User
Longtime User
The dimensions of your RadioButtons, with 25dip, are simply too small?
Setting them to 30dip they are displayed as you expect!

upload_2018-9-21_20-29-15.png
upload_2018-9-21_20-28-19.png


You have overlapping views, why?

upload_2018-9-21_20-26-32.png


You have two layout variants:
320 x 600 and 320 x 607
Why?
And what for?
 
Upvote 0

Frank660405

Member
Licensed User
Longtime User
thank you, klaus! thank all the friends! the problem are solved.

it is all my faults.

i use 21X25 for radio button, it is not proper even above-below direction is good but left-right direction is not. 30X30 is perfect.

overlapping the views is because the views will not at the proper position. i will try to test.

two layout variants was a mistake.

thank you all again!
 
Upvote 0

Yayou49

Active Member
Licensed User
... I'm wondering... why don't you use the "text" property of your radio button instead of using a new label view ???
B4X:
Dim Rb As RadioButton
Rb.Text = "blabla"
This will avoid all your problems ....
 
Upvote 0

Frank660405

Member
Licensed User
Longtime User
... I'm wondering... why don't you use the "text" property of your radio button instead of using a new label view ???
B4X:
Dim Rb As RadioButton
Rb.Text = "blabla"
This will avoid all your problems ....

great! i should have learned harder.

thank you, Yayou49!
 
Upvote 0
Top