SHARE
TWEET

Untitled

a guest May 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. There are some differences how iOS and Android work with layouts with no predefined sizes which is causing this different output for your code. In your case your Label is wrapped in the default StackLayout with no dimensions and this is one of the reason not to be able to position your label at the vertical center. Another thing is the percentage value of your label set to 100%.
  2.  
  3. What I can suggest is to use different layouts for cases when you need to control both horizonal and vertical aligment.
  4.  
  5. e.g.
  6.  
  7. ```
  8. <GridLayout rows="*" columns="*" style.backgroundColor="gray" >
  9.     <Label row="0" text="vertically centered" style.verticalAlignment="center" style.textAlignment="center" textWrap="true">       </Label>
  10. </GridLayout>
  11. ```
  12.  
  13. With the above snippet, we are creating a GridLayout which will take all the available space for rows and columns (using *) and for that space will position your label vertically aligned to the center.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top