-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(list-view-ios): fix rowHeight property to apply proper item size …
…for iOS (#5693) * fix(list-view-ios): fix rowHeight property to apply proper item size for iOS * chore(apps-tests): add rowHeight tests
- Loading branch information
Showing
5 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.p-10 { | ||
padding: 10 20 10 20; | ||
} | ||
|
||
.m-b-10 { | ||
margin-bottom: 10; | ||
} | ||
|
||
.page { | ||
background-color: #F2F2F2; | ||
} | ||
|
||
ListView { | ||
background-color: yellow; | ||
} | ||
|
||
TextView { | ||
background-color: #FFF; | ||
} | ||
|
||
.bordered { | ||
border-width: 5; | ||
border-color: green; | ||
} | ||
|
||
.fixed-height { | ||
height: 55; | ||
} | ||
|
||
.border-radius { | ||
border-radius: 15; | ||
} | ||
|
||
.border-radius-nonuniform { | ||
border-radius: 10 20 30 40; | ||
} | ||
|
||
.bordered-nonuniform { | ||
border-top-color: red; | ||
border-right-color: green; | ||
border-bottom-color: blue; | ||
border-left-color: purple; | ||
border-top-width: 5; | ||
border-right-width: 10; | ||
border-bottom-width: 15; | ||
border-left-width: 20; | ||
} | ||
|
||
.body { | ||
font-size: 11; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export function onNavigatingTo(args) { | ||
const page = args.object; | ||
page.bindingContext = ["Item 1", "Item 2", "Item 3"]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigatingTo" class="page"> | ||
|
||
<Page.actionBar> | ||
<ActionBar title="My App" icon="" class="action-bar"> | ||
</ActionBar> | ||
</Page.actionBar> | ||
|
||
<StackLayout> | ||
<StackLayout class="p-10" row="0"> | ||
<Label text="Row height = 40" class="body m-b-10"/> | ||
<ListView items="{{ $value }}" rowHeight="40"> | ||
<ListView.itemTemplate> | ||
<Label text="{{ $value }}" backgroundColor="green"/> | ||
</ListView.itemTemplate> | ||
</ListView> | ||
</StackLayout> | ||
<StackLayout class="p-10" row="0"> | ||
<Label text="Row height pixels = 40" class="body m-b-10"/> | ||
<ListView items="{{ $value }}" rowHeight="40px"> | ||
<ListView.itemTemplate> | ||
<Label text="{{ $value }}" backgroundColor="green"/> | ||
</ListView.itemTemplate> | ||
</ListView> | ||
</StackLayout> | ||
<StackLayout class="p-10" row="0"> | ||
<Label text="Row height dips = 40" class="body m-b-10"/> | ||
<ListView items="{{ $value }}" rowHeight="40dips"> | ||
<ListView.itemTemplate> | ||
<Label text="{{ $value }}" backgroundColor="green"/> | ||
</ListView.itemTemplate> | ||
</ListView> | ||
</StackLayout> | ||
</StackLayout> | ||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters