Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion apps/toolbox/src/pages/labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
</Page.actionBar>
<ScrollView>
<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
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"
Expand Down
1 change: 1 addition & 0 deletions packages/core/ui/label/index.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class Label extends TextBase implements LabelDefinition {
const textView = this.nativeTextViewProtected;
textView.setSingleLine(true);
textView.setEllipsize(android.text.TextUtils.TruncateAt.END);
textView.setGravity(android.view.Gravity.CENTER_VERTICAL);
}

[whiteSpaceProperty.setNative](value: CoreTypes.WhiteSpaceType) {
Expand Down