[Material] + [Android, iOS] Refactored and fixed lots of button layout issues (#4967)
* [Android] Refactored and fixed lots of button layout issues
- All text, image and content layout logic has been extracted into a separate manager
- Fixed the issue buttons with just an image changing size
- Fixed a few button padding issues (still needs another look)
- Fixed the issue with the content layout changes not updating the actual button layout
- Fixed image positioning for all (not legacy) buttons
- Material button no longer uses material image layout as it overrides the custom positioning
- Fixed a few other issues where properties don't change the native button, or layouts break the positioning of the image
* [Button] Fixed a whole bunch of issues
- added a platform specific "BorderAdjustsPadding" to Android and iOS to prevent border overlap
- added a new gallery with all sorts of buttons
- improvements to the Android button layout manager
- fixed to the Android button measure/layout process
* [Android] [Button] The preservation of default padding is now a flag
* [iOS] [Button] Extracted all the layout logic for the classic button
- yet to update Material button to use this
- fixed a few issues with the iOS layout
- content layout changes were not updating the control
- top/bottom did not respect spacing
- the native control trimmed text in the getter, so use the value from the element
* Removing the platform specifics as they were the wrong property
- the property is part of the renderer implementation
- Material button on iOS still needs implementing
* Updated the material button to use the layout manager
- the iOS layout logic needs some more investigation
* remove old comments
* A fix for when there is no text and some backwards compatibility
* Added a more realistic set of values
* Restrict the material button border to 1px. See #4951.
* Fixed that issue with the buttons and the padding...
- Removed the inset so that layout is accurate
- set the padding to 8dp to match that of iOS and Material
- set the minimum height to 36 according to Material (it was 48dp, with 12dp total inset, and, 48-12=36)
* Update Xamarin.Forms.Core/Button.cs
Co-Authored-By: mattleibow <mattleibow@live.com>
* Don't add members to the public type
* [Material] Added a button to change text size in the demo page
* appcompat regression fixes
* move state checks around
* fix bad merge
* adding delay to ui tests