Nathan Walker
2023-03-13 09:32:29 -07:00
committed by GitHub
parent a19568c0d0
commit a23c8bda31
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,16 @@
</Page.actionBar> </Page.actionBar>
<ScrollView> <ScrollView>
<StackLayout padding="20"> <StackLayout padding="20">
<Label text="maxLines 2" fontWeight="bold" /> <GridLayout borderWidth="1" borderColor="#efefef" height="60" paddingLeft="5">
<Label text="Test Label 1: should be aligned middle" />
</GridLayout>
<GridLayout marginTop="10" borderWidth="1" borderColor="#efefef" height="60" paddingLeft="5">
<Label text="Test Label 2: should be aligned bottom" verticalAlignment="bottom" />
</GridLayout>
<GridLayout marginTop="10" borderWidth="1" borderColor="#efefef" height="60" paddingLeft="5">
<Label text="Test Label 3: should be aligned top" verticalAlignment="top" />
</GridLayout>
<Label text="maxLines 2" fontWeight="bold" marginTop="10" />
<Label <Label
text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum." text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
textWrap="true" textWrap="true"

View File

@ -39,6 +39,7 @@ export class Label extends TextBase implements LabelDefinition {
const textView = this.nativeTextViewProtected; const textView = this.nativeTextViewProtected;
textView.setSingleLine(true); textView.setSingleLine(true);
textView.setEllipsize(android.text.TextUtils.TruncateAt.END); textView.setEllipsize(android.text.TextUtils.TruncateAt.END);
textView.setGravity(android.view.Gravity.CENTER_VERTICAL);
} }
[whiteSpaceProperty.setNative](value: CoreTypes.WhiteSpaceType) { [whiteSpaceProperty.setNative](value: CoreTypes.WhiteSpaceType) {