FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge branch 'master' into animate-width-height · NativeScript/NativeScript@7458e68 · GitHub

Repository navigation

Commit 7458e68

Browse files
authored
Merge branch 'master' into animate-width-height
2 parents fafa702 + b97cf95 commit 7458e68

52 files changed

Lines changed: 632 additions & 188 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
<a name="5.4.0"></a>
2+
# [5.4.0](https://github.com/NativeScript/NativeScript/compare/5.3.2...5.4.0) (2019-05-14)
3+
4+
5+
### Bug Fixes
6+
7+
* throw if failed to load component ([#7186](https://github.com/NativeScript/NativeScript/issues/7186)) ([b7abb3d](https://github.com/NativeScript/NativeScript/commit/b7abb3d))
8+
* **android/button:** possible incorrect button visual state ([#7190](https://github.com/NativeScript/NativeScript/issues/7190)) ([2a02360](https://github.com/NativeScript/NativeScript/commit/2a02360))
9+
* **devtools-ios:** Ensure UI modifications run on main thread ([c60f74d](https://github.com/NativeScript/NativeScript/commit/c60f74d)), closes [#7219](https://github.com/NativeScript/NativeScript/issues/7219)
10+
* **ios:** add null check to TouchGestureRecognizer ([#7182](https://github.com/NativeScript/NativeScript/issues/7182)) ([7d3f0d9](https://github.com/NativeScript/NativeScript/commit/7d3f0d9))
11+
* **ios:** application.displayedEvent does not depend on trace to fire ([#7141](https://github.com/NativeScript/NativeScript/issues/7141)) ([#7156](https://github.com/NativeScript/NativeScript/issues/7156)) ([4e56c89](https://github.com/NativeScript/NativeScript/commit/4e56c89))
12+
* **ios:** image cache module not longer sets null in NSCache ([#7171](https://github.com/NativeScript/NativeScript/issues/7171)) ([4f79d2e](https://github.com/NativeScript/NativeScript/commit/4f79d2e))
13+
* **ios-modal:** closeCallback not being called with popover presentation style ([#7189](https://github.com/NativeScript/NativeScript/issues/7189)) ([aa44eb9](https://github.com/NativeScript/NativeScript/commit/aa44eb9))
14+
* **ios-tabview:** crash when setting tab text color ([#7188](https://github.com/NativeScript/NativeScript/issues/7188)) ([77c45da](https://github.com/NativeScript/NativeScript/commit/77c45da))
15+
* **text:** crash when removing FormattedText ([#7237](https://github.com/NativeScript/NativeScript/issues/7237)) ([37b53c6](https://github.com/NativeScript/NativeScript/commit/37b53c6))
16+
17+
18+
### Features
19+
20+
* **android:** elevation shadow support ([#7136](https://github.com/NativeScript/NativeScript/issues/7136)) ([cf533a7](https://github.com/NativeScript/NativeScript/commit/cf533a7))
21+
* **android:** implement a 'activityNewIntent' event ([3efc06e](https://github.com/NativeScript/NativeScript/commit/3efc06e))
22+
* **android:** implement BorderDrawable outline ([ec07a99](https://github.com/NativeScript/NativeScript/commit/ec07a99))
23+
* **hmr:** preserve navigation history on applying changes ([#7146](https://github.com/NativeScript/NativeScript/issues/7146)) ([d35e14e](https://github.com/NativeScript/NativeScript/commit/d35e14e))
24+
* **switch:** add property for off state background color ([#7138](https://github.com/NativeScript/NativeScript/issues/7138)) ([f0146f0](https://github.com/NativeScript/NativeScript/commit/f0146f0))
25+
26+
27+
128
## [5.3.2](https://github.com/NativeScript/NativeScript/compare/5.3.1...5.3.2) (2019-05-03)
229

330

‎apps/app/ui-tests-app/button/button-border.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Button {
4646
}
4747

4848
#s10 {
49-
border-width: 5 0; border-color: black; background-color: white;
49+
android-elevation: 0; border-width: 5 0; border-color: black;
5050
}
5151

5252
#s11 {
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Label, Button {
2+
text-align: center;
3+
padding: 10;
4+
margin: 16;
5+
background-color: #bbb;
6+
}
7+
8+
.elevation-0 {
9+
android-elevation: 0;
10+
}
11+
12+
.elevation-2 {
13+
android-elevation: 2;
14+
}
15+
16+
.elevation-4 {
17+
android-elevation: 4;
18+
}
19+
20+
.elevation-4:highlighted {
21+
android-elevation: 2;
22+
}
23+
24+
.elevation-8 {
25+
android-elevation: 8;
26+
}
27+
28+
.elevation-10 {
29+
android-elevation: 10;
30+
}
31+
32+
.pressed-z-10 {
33+
android-dynamic-elevation-offset: 10;
34+
}
35+
36+
.round {
37+
color: #fff;
38+
background-color: #ff1744;
39+
border-radius: 50%; /* TODO kills elevation */
40+
width: 80;
41+
height: 80;
42+
android-elevation: 8;
43+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Button } from "tns-core-modules/ui/button/button";
2+
import { EventData } from "tns-core-modules/ui/page/page";
3+
4+
const states = [
5+
{ class: "", text: "default elevation" },
6+
{ class: "elevation-10", text: "elevetion 10" },
7+
{ class: "elevation-10 pressed-z-10", text: "elevetion 10 pressed-z 10" },
8+
{ class: "elevation-0", text: "elevetion 0" },
9+
]
10+
let currentState = 0;
11+
12+
export function buttonTap(args: EventData) {
13+
let btn: Button = args.object as Button;
14+
currentState++;
15+
if (currentState >= states.length) {
16+
currentState = 0;
17+
}
18+
btn.className = states[currentState].class;
19+
btn.text = states[currentState].text;
20+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="onLoaded">
2+
<ScrollView>
3+
<StackLayout backgroundColor="aliceblue" androidElevation="2" padding="10" margin="20">
4+
<Button text="default elevation" tap="buttonTap"/>
5+
6+
<Button class="elevation-0" text="elevation 0"/>
7+
8+
<Label class="elevation-2" text="Label with elevation 2"/>
9+
10+
<StackLayout androidElevation="4" backgroundColor="#ff1744" horizontalAlignment="center" margin="20">
11+
<Button class="elevation-2" text="elevation 2"/>
12+
<Button class="elevation-4" text="elevation 4"/>
13+
</StackLayout>
14+
15+
<StackLayout orientation="horizontal" horizontalAlignment="center">
16+
<Button class="round" androidElevation="4" text="el. 4"/>
17+
<Button class="elevation-8 round" text="el. 8"/>
18+
</StackLayout>
19+
20+
<Label class="elevation-8" text="elevation 8"/>
21+
<Button class="elevation-8" text="elevation 8, with radius" borderRadius="4"/>
22+
<Button class="elevation-10" text="elevation 10"/>
23+
</StackLayout>
24+
</ScrollView>
25+
</Page>

‎apps/app/ui-tests-app/css/main-page.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export function loadExamples() {
3838
examples.set("margins-paddings-with-percentage", "css/margins-paddings-with-percentage");
3939
examples.set("padding-and-border", "css/padding-and-border");
4040
examples.set("combinators", "css/combinators");
41+
examples.set("elevation", "css/elevation");
4142
examples.set("styled-formatted-text", "css/styled-formatted-text");
4243
examples.set("non-uniform-radius", "css/non-uniform-radius");
4344
examples.set("missing-background-image", "css/missing-background-image");

‎apps/app/ui-tests-app/css/pixels.xml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<Label text="pixels" />
55
<StackLayout borderWidth="1px" borderColor="black" horizontalAlignment="left" verticalAlignment="top" orientation="horizontal" padding="1px">
66
<Label text="Label" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
7-
<Button text="Button" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" backgroundColor="orange" />
7+
<Button text="Button" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" androidElevation="0" />
88
<TextView text="Text View" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
99
<TextField text="Text Field" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
1010
<Image src="~/ui-tests-app/resources/images/gravatar.png" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
1111
</StackLayout>
1212

1313
<StackLayout borderWidth="2px" borderColor="green" orientation="horizontal" padding="2px">
1414
<Label text="Label" borderWidth="5px" borderRadius="10px" borderColor="black" padding="5px" margin="5px" />
15-
<Button text="Button" borderWidth="4px" borderRadius="10px" borderColor="black" padding="4px" margin="4px" backgroundColor="orange" />
15+
<Button text="Button" borderWidth="4px" borderRadius="10px" borderColor="black" padding="4px" margin="4px" androidElevation="0" />
1616
<TextView text="Text View" borderWidth="3px" borderRadius="10px" borderColor="black" padding="3px" margin="3px" />
1717
<TextField text="Text Field" borderWidth="2px" borderRadius="10px" borderColor="black" padding="2px" margin="2px" />
1818
</StackLayout>
@@ -32,15 +32,15 @@
3232
<Label text="device independent pixels" />
3333
<StackLayout borderWidth="1" borderColor="black" horizontalAlignment="left" verticalAlignment="top" orientation="horizontal" padding="1">
3434
<Label text="Label" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
35-
<Button text="Button" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" backgroundColor="orange" />
35+
<Button text="Button" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" androidElevation="0" />
3636
<TextView text="Text View" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
3737
<TextField text="Text Field" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
3838
<Image src="~/ui-tests-app/resources/images/gravatar.png" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
3939
</StackLayout>
4040

4141
<StackLayout borderWidth="2" borderColor="green" orientation="horizontal" padding="2">
4242
<Label text="Label" borderWidth="5" borderRadius="10" borderColor="black" padding="5" margin="5" />
43-
<Button text="Button" borderWidth="4" borderRadius="10" borderColor="black" padding="4" margin="4" backgroundColor="orange" />
43+
<Button text="Button" borderWidth="4" borderRadius="10" borderColor="black" padding="4" margin="4" androidElevation="0" />
4444
<TextView text="Text View" borderWidth="3" borderRadius="10" borderColor="black" padding="3" margin="3" />
4545
<TextField text="Text Field" borderWidth="2" borderRadius="10" borderColor="black" padding="2" margin="2" />
4646
</StackLayout>

‎apps/app/ui-tests-app/flexbox/flexbox.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
border-color: gray;
2121
}
2222
.control Button {
23+
android-elevation: 0;
2324
border-width: 1 1 0 0;
2425
border-color: gray;
25-
background-color: white;
2626
font-size: 9;
2727
padding: 0;
2828
height: 0;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#button1 {
2-
border-color: transparent;
2+
android-elevation: 0;
3+
border-color: rgba(0, 0, 0, 0);
34
border-width: 3;
4-
background-color: white;
55
}
66

77
#button2 {
8+
android-elevation: 0;
89
border-color: rgba(0, 0, 0, 0.5);
910
border-width: 3;
10-
background-color: white;
1111
}
1212

1313
#button3 {
14+
android-elevation: 0;
1415
border-width: 3;
15-
background-color: white;
1616
}

‎apps/app/ui-tests-app/tab-view/main-page.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ export function loadExamples() {
2727
examples.set("tab-view-tab-text-font-size", "tab-view/tab-view-tab-text-font-size");
2828
examples.set("tab-view-android-swipe", "tab-view/tab-view-android-swipe");
2929
examples.set("tab-view-icon-title-placement", "tab-view/icon-title-placement");
30+
examples.set("tab-text-color", "tab-view/tab-text-color");
3031
return examples;
3132
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL