mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(utils): dismissKeyboard, copyToClipboard, setWindowBackgroundColor, getCurrentActivity and getResource (#10089)
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { EventData, Page } from '@nativescript/core';
|
||||
import { EventData, Page, Utils } from '@nativescript/core';
|
||||
import { HelloWorldModel } from './main-view-model';
|
||||
|
||||
export function navigatingTo(args: EventData) {
|
||||
const page = <Page>args.object;
|
||||
page.bindingContext = new HelloWorldModel();
|
||||
|
||||
if (global.isIOS) {
|
||||
Utils.ios.setWindowBackgroundColor('blue');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { Application } from '@nativescript/core';
|
||||
import { Application, Utils } from '@nativescript/core';
|
||||
|
||||
Application.run({ moduleName: 'app-root' });
|
||||
|
||||
@@ -10,7 +10,7 @@ export class BoxShadowModel extends Observable {
|
||||
private _selectedBackgroundType: string;
|
||||
private _selectedBorderType: string;
|
||||
private _selectedAnimation: string;
|
||||
private _boxShadow: string = '0 10 15 -3 rgba(200, 0, 0, 0.4)';
|
||||
private _boxShadow: string = '0 0 2 2 rgba(200, 0, 0, 0.4)';
|
||||
// private _boxShadow: string = '5 5 1 1 rgba(255, 0, 0, .9)';
|
||||
// private _boxShadow: string = '5 5 5 10 rgba(255, 0, 0, .9)';
|
||||
|
||||
|
||||
@@ -5,13 +5,16 @@
|
||||
</Page.actionBar>
|
||||
|
||||
<StackLayout class="p-10">
|
||||
<Label text="iPhone by default plays media content in a webview in full screen, meaning it takes over your whole UI. You can toggle this on and off with a cool new property: iosAllowInlineMediaPlayback" textWrap="true" style="color: gray;" class="m-b-10 v-center text-center" />
|
||||
<Label text="iPhone by default plays media content in a webview in full screen, meaning it takes over your whole UI. You can toggle this on and off with a cool new property: iosAllowInlineMediaPlayback" textWrap="true" style="color: gray;" class="m-b-10 v-center text-center" />
|
||||
|
||||
<Label style="color: gray;" textWrap="true" class="m-b-5 text-center" text="This webview plays this youtube content inline." />
|
||||
<WebView iosAllowInlineMediaPlayback="true" src="https://sphere.presonus.com/video/youtube/QnGX0xrv6Dw" height="200" />
|
||||
<Label style="color: gray;" textWrap="true" class="m-b-5 text-center" text="This webview plays this youtube content inline." />
|
||||
<GridLayout rows="200" columns="">
|
||||
<WebView iosAllowInlineMediaPlayback="true" src="https://www.youtube.com/embed/Mzy1jWxrSiw" height="200" />
|
||||
</GridLayout>
|
||||
<Label style="color: gray;" textWrap="true" class="m-b-5 m-t-20 text-center" text="This webview forces media content into fullscreen on iPhone." />
|
||||
<GridLayout rows="200" columns="">
|
||||
<WebView src="https://www.youtube.com/embed/Mzy1jWxrSiw" height="200" />
|
||||
</GridLayout>
|
||||
|
||||
<Label style="color: gray;" textWrap="true" class="m-b-5 m-t-20 text-center" text="This webview forces media content into fullscreen on iPhone." />
|
||||
<WebView src="https://sphere.presonus.com/video/youtube/QnGX0xrv6Dw" height="200" />
|
||||
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</Page>
|
||||
|
||||
Reference in New Issue
Block a user