Skip to content

Vertically center label on android by default #3829

@dbenninger

Description

@dbenninger

Tell us about the problem

The text of a label is vertically centered by default on iOS, but not on Android. It would be nice if the label on Android behaves the same by default. I think adding setGravity(CENTER_VERTICAL) to the android implementation would solve this.

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • CLI: 2.5.2
  • Cross-platform modules: 2.5.1
  • Runtime(s): 2.5.0

Please tell us how to recreate the issue in as much detail as possible.

  1. tns create "LabelTest" --ng
  2. Open items.component.html
  3. Remove the <ListView ....
  4. Add <Label style="height: 100%" text="This should be in the middle of the screen"></Label>
  5. tns run ios
  6. The text is in the middle of the screen
  7. tns run android
  8. The text is top-aligned

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions