mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
UI test: Transparent Action Bar example
This commit is contained in:
@@ -17,6 +17,7 @@ export function pageLoaded(args: EventData) {
|
|||||||
examples.set("actView", "action-bar/action-view");
|
examples.set("actView", "action-bar/action-view");
|
||||||
examples.set("actionItemPosition", "action-bar/action-item-position");
|
examples.set("actionItemPosition", "action-bar/action-item-position");
|
||||||
examples.set("actBGCss", "action-bar/background-css");
|
examples.set("actBGCss", "action-bar/background-css");
|
||||||
|
examples.set("actTransparentBgCss", "action-bar/transparent-bg-css");
|
||||||
|
|
||||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||||
page.bindingContext = viewModel;
|
page.bindingContext = viewModel;
|
||||||
|
|||||||
7
apps/app/ui-tests-app/action-bar/transparent-bg-css.css
Normal file
7
apps/app/ui-tests-app/action-bar/transparent-bg-css.css
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.action {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
Page {
|
||||||
|
background-color: green;
|
||||||
|
}
|
||||||
5
apps/app/ui-tests-app/action-bar/transparent-bg-css.ts
Normal file
5
apps/app/ui-tests-app/action-bar/transparent-bg-css.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import frame = require("ui/frame");
|
||||||
|
|
||||||
|
export function navigate(args) {
|
||||||
|
frame.topmost().navigate("ui-tests-app/action-bar/clean");
|
||||||
|
}
|
||||||
6
apps/app/ui-tests-app/action-bar/transparent-bg-css.xml
Normal file
6
apps/app/ui-tests-app/action-bar/transparent-bg-css.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<Page>
|
||||||
|
<ActionBar title="This is transparent" class="action" />
|
||||||
|
<StackLayout>
|
||||||
|
<Button text="go to cleared page" tap="navigate"/>
|
||||||
|
</StackLayout>
|
||||||
|
</Page>
|
||||||
Reference in New Issue
Block a user