mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
4
apps/ui/app/progress-bar/activity-indicator-page.xml
Normal file
4
apps/ui/app/progress-bar/activity-indicator-page.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page>
|
||||
<ActivityIndicator busy="true" verticalAlignment="center" horizontalAlignment="center"/>
|
||||
</Page>
|
||||
18
apps/ui/app/progress-bar/main-page.ts
Normal file
18
apps/ui/app/progress-bar/main-page.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { EventData } from '@nativescript/core/data/observable';
|
||||
import { SubMainPageViewModel } from '../sub-main-page-view-model';
|
||||
import { WrapLayout } from '@nativescript/core/ui/layouts/wrap-layout';
|
||||
import { Page } from '@nativescript/core/ui/page';
|
||||
|
||||
export function pageLoaded(args: EventData) {
|
||||
const page = <Page>args.object;
|
||||
const wrapLayout = <WrapLayout>page.getViewById('wrapLayoutWithExamples');
|
||||
page.bindingContext = new SubMainPageViewModel(wrapLayout, loadExamples());
|
||||
}
|
||||
|
||||
export function loadExamples() {
|
||||
const examples = new Map<string, string>();
|
||||
examples.set('activity-indicator', 'progress-bar/activity-indicator-page');
|
||||
examples.set('progress-bar', 'progress-bar/progress-page');
|
||||
|
||||
return examples;
|
||||
}
|
||||
6
apps/ui/app/progress-bar/main-page.xml
Normal file
6
apps/ui/app/progress-bar/main-page.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page loaded="pageLoaded">
|
||||
<ScrollView orientation="vertical" row="1">
|
||||
<WrapLayout id="wrapLayoutWithExamples"/>
|
||||
</ScrollView>
|
||||
</Page>
|
||||
4
apps/ui/app/progress-bar/progress-page.xml
Normal file
4
apps/ui/app/progress-bar/progress-page.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page>
|
||||
<Progress verticalAlignment="center" maxValue="100" value="60" margin="10"/>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user