I have been developing an App for months.
Yet, now, I have gotten to a point where I have a problem I do not know how to solve.
(A part of the App is attached, so you can test this problem.
For doing it, just install it, and open Live Rhythm, 10 Figures will appear, and you will be seeing the problem, which is contained in RhythmMain Class, in "Abrir" Method.
Just be sure to do not touch any other thing, because then, the App will crash, due to that I removed all the rest of the App).
I am currently creating and position images via setX, one by one, and the positioning has no problem, the case of the attached image "Problem 1 - A".
Yet, if I try to create and position all the images with a for method, all in one time, the images get away from each other by their total width (you have to know that all the images have transparent space at their right, so that space you see between them, is part of the images itself).
You can see this result in the attached image "Problem 1 - B".
The result, should be that they should get positioned like in the image "Problem 1 - A", yet, it happens what you see in the second picture.
(It is not a problem of saving incorrectly the positions, because in the Second Picture, and in the Code, I am just trying to put them separated by 15 pixels, just as testing, in which case they should result OVERLAPPED like in the First Picture, yet, they get separated by their total width).
One important detail I want to add, is that all the width of all the images, gets added to the parent layout width.
So if I add 3 Images of 50dp, to a Layout of 200dp, then the total width of the layout passes to be of 350dp, when in should stay at 200dp, with no change in its width.
So then if I put a 50 pixels width first image at setX 10 pixels, and the second, same width, at setX 11 pixels, the second image is setX at 61 pixels (the 50 of the first image are not even considered as coordinates by setX, they are skipped).
I need proper solution to solve correctly this issue.
This would mean that the solution I seek, is just that if by the for method, I set the images 15 pixels away from each other (overlapped), then, they should get kind like in the First Picture.
What I mean, is that I do not want strange solutions that will difficult other functions of the App.
(Part of that is avoiding changing the current LinearLayout for a Relative Layout, and try to avoid setMargins).
To anyone who wants to solve it, and who would achieve it properly, I will give him, her, $60 Dollars.
I will await for your proposals.
Thank you for your time.
If when you install the App for the first time, it asks you to select a folder, just select any one, and then keep proceeding as I described before.
11 pekerja bebas membida secara purata $109 untuk pekerjaan ini
Hi I have great experience in android and IOS apps development and I can solve your UI problem in your application for you according to your requirements Please inbox me for more details. Thanks