You can read about the native Android layout constants here:
ViewGroup.LayoutParams | Android Developers.
int FILL_PARENT Special value for the height or width requested by a View.
int MATCH_PARENT Special value for the height or width requested by a View.
int WRAP_CONTENT Special value for the height or width requested by a View.
FILL_PARENT and MATCH_PARENT are identical, FILL_PARENT has been part of the native Android API since it was first released.
MATCH_PARENT was added from level 8 onwards (Froyo).
If you were writing Java using Eclipse you'd use the constant names.
The underlying values for the constants are:
FILL_PARENT and MATCH_PARENT -1
WRAP_CONTENT -2
Now within the B4A IDE there are some View properties where you can use -1 or -2 for a value and it will work as expected.
Within the Visual Designer though if you set a View width as -1 or -2 then that View will display within the Abstract Designer and on the emulator or device if connected as if that property was set to 0.
But save the layout and load it in an Activity and you'll see that the values -1 and/or -2 are generally applied correctly.
As i said not all Views will display properly if the constant values are used.
As for getting a View width or height if it has not been explicity coded - that's a problem whether you use a constant or just allow the Activity.AddView method to size the View...
The B4A View Width and Height properties will (i think) only return a value if you explicitly set a value.
Otherwise they will return a value of 0.
Things are complicated further by the fact that a View has no layout values until it has been added to an Activity AND the Activity has rendered the View to the display.
I've not found a solution with B4A yet, with Java (let's say Java that's creating a library) you can add an event listener to an Activity.
The event listener listens for the Activity's onGlobalLayout event.
Once the listener has detected that event you can use Java methods to get the rendered size of a View.
You cannot get the rendered size values of a View from B4A though, so if you have not explicitly set Width and Height values you're stuck.
Martin.
(My posts seems to be getting more verbose as time goes by LOL)