R rkmoray Active Member Licensed User Longtime User Apr 3, 2018 #1 In my new app, I Am using an ocr (works great), but to give the user a visual target,I am using labels to create a large transparent box. The box look great on the emulator, but when I run it on a phone(6.1 O.S), I get the following visual seen in the attachment. as you can see, the right side is not in alignment. Activity.AddView(l2,8%x , 8%y,4dip,70%y)'left Activity.AddView(l3, 8%x ,8%y,50%y, 4dip)'top Activity.AddView(l4, 90%x ,8%y, 4dip, 70%y) 'Right Activity.AddView(l5, 8%x,78%y,50%y, 4dip)'bottom Attachments Screenshot_2018-04-03_083102.jpg 144.9 KB · Views: 598
In my new app, I Am using an ocr (works great), but to give the user a visual target,I am using labels to create a large transparent box. The box look great on the emulator, but when I run it on a phone(6.1 O.S), I get the following visual seen in the attachment. as you can see, the right side is not in alignment. Activity.AddView(l2,8%x , 8%y,4dip,70%y)'left Activity.AddView(l3, 8%x ,8%y,50%y, 4dip)'top Activity.AddView(l4, 90%x ,8%y, 4dip, 70%y) 'Right Activity.AddView(l5, 8%x,78%y,50%y, 4dip)'bottom
DonManfred Expert Licensed User Longtime User Apr 3, 2018 #2 As far i can see it looks OK. The - additional EDGE part of the Screen - does not belong to the Activity. The EDGE room can not be used within a App without having a Library for this Samsung specific Feature. If you remove the EDGE on the right side then you´ll see that the left and right margin are the same. Upvote 0
As far i can see it looks OK. The - additional EDGE part of the Screen - does not belong to the Activity. The EDGE room can not be used within a App without having a Library for this Samsung specific Feature. If you remove the EDGE on the right side then you´ll see that the left and right margin are the same.
R rkmoray Active Member Licensed User Longtime User Apr 3, 2018 #3 and how would I remove the edge? Upvote 0
DonManfred Expert Licensed User Longtime User Apr 3, 2018 #4 you can not remove it. It is part of the EDGE Feature of your Samsung device. The right part (the one with the EDGE) you can not use in your activity. Upvote 0
you can not remove it. It is part of the EDGE Feature of your Samsung device. The right part (the one with the EDGE) you can not use in your activity.
R rkmoray Active Member Licensed User Longtime User Apr 3, 2018 #5 What can I do to solve this issue, so the box looks proper, no matter what phone is used? Last edited: Apr 3, 2018 Upvote 0
klaus Expert Licensed User Longtime User Apr 4, 2018 #6 I don't understand the logic in your code: Code: Copy Activity.AddView(l2,8%x , 8%y,4dip,70%y)'left Activity.AddView(l3, 8%x ,8%y,50%y, 4dip)'top Activity.AddView(l4, 90%x ,8%y, 4dip, 70%y) 'Right Activity.AddView(l5, 8%x,78%y,50%y, 4dip)'bottom For the top and bottom lines you set the width to 50%y, why %y and not %x? Then, you position the right line at 90%x, this is wrong! This code works: Code: Copy Activity.AddView(l2, 8%x , 8%y, 4dip, 70%y)'left Activity.AddView(l3, 8%x , 8%y, 84%x, 4dip)'top Activity.AddView(l4, 92%x - 4dip ,8%y, 4dip, 70%y) 'Right Activity.AddView(l5, 8%x, 78%y - 4dip, 84%x, 4dip)'bottom But why don't you use a transparent Panel and set its border size and color. You could also add the Panel in the Designer and use anchors. Attachments upload_2018-4-4_9-25-4.png 5.1 KB · Views: 607 Upvote 0
I don't understand the logic in your code: Code: Copy Activity.AddView(l2,8%x , 8%y,4dip,70%y)'left Activity.AddView(l3, 8%x ,8%y,50%y, 4dip)'top Activity.AddView(l4, 90%x ,8%y, 4dip, 70%y) 'Right Activity.AddView(l5, 8%x,78%y,50%y, 4dip)'bottom For the top and bottom lines you set the width to 50%y, why %y and not %x? Then, you position the right line at 90%x, this is wrong! This code works: Code: Copy Activity.AddView(l2, 8%x , 8%y, 4dip, 70%y)'left Activity.AddView(l3, 8%x , 8%y, 84%x, 4dip)'top Activity.AddView(l4, 92%x - 4dip ,8%y, 4dip, 70%y) 'Right Activity.AddView(l5, 8%x, 78%y - 4dip, 84%x, 4dip)'bottom But why don't you use a transparent Panel and set its border size and color. You could also add the Panel in the Designer and use anchors.
R rkmoray Active Member Licensed User Longtime User Apr 4, 2018 #7 That is perfect, thank you for the help Upvote 0