Mateja
(Mateja)
June 8, 2020, 7:13pm
#1
Hey, just using the Dynamic Space component and I can’t get it to width: fill parent.
I saw this:
First of all I have no idea that why App Inventor uses different constant values from android.The constant values defined/used in android are as follows:
Fill Parent/Match Parent : -1
Wrap Content : -2
Now the constant values used in AI are as follows:
Match Parent/Fill Parent : -2
Wrap Content : -1
In answer to your question:
Fill Parent: it will take all available space
Wrap Content: it will take only required space
In android documentation they are defined as follows:
Fill Parent/Ma…
It works for literally all the components except this one.
When I type -2, well, it takes that seriously, and makes the left margin -2px, so you can say it sticks them together.
My blocks are here:
Sorry if there is a simple logic (like width minus height blah blah blah), I’m really tired.
Thanks
1 Like
In dynamic card view, we use -1 for wrap content and -2 for fill parent.
This is not the case with SpaceView.
2 Likes
Actually, i don’t think you can use the same ID with the arrangement and the space
Try type in random width to see if it’s really created.
And no, it works for all component.
Mateja
(Mateja)
June 9, 2020, 5:13am
#4
The dynamic space is a component by itself. I only create spaces with it.
Yes, it does indeed create a space with the desired width.
Mateja
(Mateja)
June 9, 2020, 5:57am
#5
Alright, so this is how I’ve done it.
2 Likes
system
(system)
Closed
July 9, 2020, 5:57am
#6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.