Skip to content

Commit 50c2a8a

Browse files
committed
test: demo app update
1 parent 04a3a2a commit 50c2a8a

File tree

10 files changed

+32
-43
lines changed

10 files changed

+32
-43
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
ext {
2-
androidXMaterial = "1.2.0"
2+
androidXMaterial = "1.2.1"
3+
androidXMaterial = "1.2.1"
34
}

demo-vue/app/App_Resources/Android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
<application
2222
android:name="com.tns.NativeScriptApplication"
2323
android:allowBackup="true"
24+
android:supportsRtl="true"
2425
android:icon="@drawable/icon"
2526
android:label="@string/app_name"
2627
android:theme="@style/AppTheme">
2728

2829
<activity
2930
android:name="com.tns.NativeScriptActivity"
3031
android:label="@string/title_activity_kimera"
31-
android:configChanges="keyboardHidden|orientation|screenSize"
3232
android:theme="@style/LaunchScreenTheme">
3333

3434
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />

demo-vue/app/App_Resources/Android/src/main/res/values-v21/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
</style>
99

1010
<!-- Default style for DatePicker - in spinner mode -->
11-
<style name="SpinnerDatePicker" parent="android:Widget.Material.Light.DatePicker">
11+
<style name="SpinnerDatePicker" parent="android:Widget.Material.DatePicker">
1212
<item name="android:datePickerMode">spinner</item>
1313
</style>
1414

1515
<!-- Default style for TimePicker - in spinner mode -->
16-
<style name="SpinnerTimePicker" parent="android:Widget.Material.Light.TimePicker">
16+
<style name="SpinnerTimePicker" parent="android:Widget.Material.TimePicker">
1717
<item name="android:timePickerMode">spinner</item>
1818
</style>
1919

demo-vue/app/App_Resources/Android/src/main/res/values/styles.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
<!-- theme to use FOR launch screen-->
55
<style name="LaunchScreenThemeBase" parent="Theme.MaterialComponents.DayNight.NoActionBar">
6-
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
76

87
<item name="colorPrimary">@color/ns_primary</item>
98
<item name="colorSecondary">@color/ns_primary</item>
@@ -25,7 +24,6 @@
2524
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
2625

2726
<item name="colorPrimary">@color/ns_primary</item>
28-
<item name="colorSecondary">@color/ns_primary</item>
2927
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
3028
<item name="colorAccent">@color/ns_accent</item>
3129

@@ -37,8 +35,8 @@
3735
<!-- theme for action-bar -->
3836
<style name="NativeScriptToolbarStyleBase" parent="Widget.AppCompat.Toolbar">
3937
<item name="android:background">@color/ns_primary</item>
40-
<item name="theme">@style/ThemeOverlay.AppCompat.ActionBar</item>
41-
<item name="popupTheme">@style/ThemeOverlay.AppCompat</item>
38+
<item name="theme">@style/ThemeOverlay.MaterialComponents.ActionBar</item>
39+
<item name="popupTheme">@style/ThemeOverlay.MaterialComponents</item>
4240

4341
</style>
4442

demo-vue/app/app.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ button {
55
elevation: 2;
66
}
77

8+
// page {
9+
// background-color: black;
10+
// }
811

912
.falseFAb {
1013
elevation: 2;

demo-vue/app/examples/Buttons.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<MDFloatingActionButton src="res://ic_action_add" @tap="onTap" horizontalAlignment="center" />
2222
<MDFloatingActionButton id="fab" src="res://ic_action_add" color="white" backgroundColor="blue" size="mini" @tap="onTap" horizontalAlignment="center" />
2323
<MDFloatingActionButton src="res://ic_action_add" text="test expanded" @tap="onTap" horizontalAlignment="center" />
24-
<MDFloatingActionButton src="res://ic_action_add" text="test expanded" :expanded="expanded" @tap="expanded = !expanded" horizontalAlignment="center" />
24+
<MDFloatingActionButton src="res://ic_action_add" text="test expanded" :expanded="expanded" @tap="switchExpanded" horizontalAlignment="center" />
2525
<StackLayout margin="10">
2626
<MDButton id="button0" text="default button" @tap="onTap" />
2727
</StackLayout>
@@ -101,6 +101,10 @@ export default Vue.extend({
101101
},
102102
onTap() {
103103
console.log('Button tapped');
104+
},
105+
switchExpanded() {
106+
console.log('switchExpanded');
107+
this.expanded = !this.expanded
104108
}
105109
}
106110
});

demo-vue/app/examples/TextView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</FormattedString>
2828
</MDTextView>
2929
<MDTextView id="textView2" editable="false" counterMaxLength="10" maxLength="10" hint="hint me" @textChange="onTextChange" @returnPress="onReturnPress" />
30-
<MDTextView id="textView3" variant="outline" hint="outline" @textChange="onTextChange" v-model="value" @returnPress="onReturnPress" />
30+
<MDTextView id="textView3" placeholderColor="green" floatingColor="yellow" color="red" variant="outline" hint="text should be red" @textChange="onTextChange" v-model="value" @returnPress="onReturnPress" />
3131
<MDTextView variant="filled" required="true" email="true" hint="fill this out..." @textChange="onTextChange" @returnPress="onReturnPress" />
3232
<MDTextView hint="fill this out..." />
3333
</StackLayout>

demo-vue/app/main.ts

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
1-
// import { knownFolders } from '@nativescript/core/file-system';
2-
// const currentApp = knownFolders.currentApp();
3-
// global.process = global.process || {} as any;
4-
// global.process.cwd = function() {
5-
// return '';
6-
// };
7-
// require('source-map-support').install({
8-
// environment: 'node',
9-
// handleUncaughtExceptions: false,
10-
// retrieveSourceMap(source) {
11-
// const sourceMapPath = source + '.map';
12-
// const appPath = currentApp.path;
13-
// let sourceMapRelativePath = sourceMapPath
14-
// // .replace('file:///', '')
15-
// .replace('file://', '')
16-
// .replace(appPath + '/', '')
17-
// .replace(appPath + '/', '');
18-
// if (sourceMapRelativePath.startsWith('app/')) {
19-
// sourceMapRelativePath = sourceMapRelativePath.slice(4);
20-
// }
21-
// // console.log('retrieveSourceMap', source, appPath, sourceMapRelativePath, currentApp.getFile(sourceMapRelativePath).readTextSync());
22-
// return {
23-
// url: sourceMapRelativePath,
24-
// map: currentApp.getFile(sourceMapRelativePath).readTextSync()
25-
// };
26-
// }
27-
// });
1+
2+
// import {Trace} from '@nativescript/core';
3+
// Trace.addCategories(Trace.categories.concat(Trace.categories.All));
4+
// Trace.enable();
285

296
import Vue from 'nativescript-vue';
307
import ActivityIndicatorPlugin from '@nativescript-community/ui-material-activityindicator/vue';
@@ -57,6 +34,7 @@ Vue.use(BottomSheetPlugin);
5734
Vue.use(BottomNavigationBarPlugin);
5835
Vue.use(TabsPlugin);
5936

37+
Vue.registerElement('Label', () => require('@nativescript-community/ui-label').Label);
6038
Vue.registerElement('PreviousNextView', () => require('@nativescript/iqkeyboardmanager').PreviousNextView);
6139
Vue.registerElement('TextViewWithHint', () => require('@nativescript/iqkeyboardmanager').TextViewWithHint);
6240

demo-vue/app/views/Home.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ export default {
66
<Page>
77
<ActionBar title="Material Vue">
88
</ActionBar>
9-
<ListView ref="listView" rowHeight="50" for="example in examples">
9+
<StackLayout>
10+
<Label paddingLeft="10" heigth="100" text="This is a text" verticalAlignment="center"/>
11+
<ListView ref="listView" rowHeight="60" for="example in examples">
1012
<v-template>
11-
<MDRipple rippleColor="red" @tap="{goToExample(example)}" @longPress="{goToModalExample(example)}" >
12-
<Label paddingLeft="10" :text="example.title" class="title" verticalAlignment="center"/>
13-
</MDRipple>
13+
<GridLayout rippleColor="red" @tap="{goToExample(example)}" @longPress="{goToModalExample(example)}" >
14+
<Label paddingLeft="10" :text="example.title" verticalAlignment="center"/>
15+
</GridLayout>
1416
</v-template>
1517
</ListView>
18+
</StackLayout>
19+
1620
</Page>
1721
`,
1822
data() {

demo-vue/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
}
1111
},
1212
"dependencies": {
13-
"@akylas/nativescript":"7.0.3-alpha.4",
13+
"@akylas/nativescript": "7.0.3-alpha.4",
1414
"@mdi/font": "4.9.95",
15+
"@nativescript-community/ui-label": "^1.0.47",
1516
"@nativescript-community/ui-material-activityindicator": "file:../packages/activityindicator",
1617
"@nativescript-community/ui-material-bottomnavigationbar": "file:../packages/bottomnavigationbar",
1718
"@nativescript-community/ui-material-bottomsheet": "file:../packages/bottomsheet",
@@ -33,9 +34,9 @@
3334
"nativescript-vue-template-compiler": "~2.8.1"
3435
},
3536
"devDependencies": {
36-
"@nativescript/core": "7.0.8",
3737
"@babel/core": "^7.11.6",
3838
"@nativescript/android": "7.0.0",
39+
"@nativescript/core": "7.0.8",
3940
"@nativescript/types": "7.0.1",
4041
"@nativescript/webpack": "3.0.4",
4142
"babel-loader": "^8.1.0",

0 commit comments

Comments
 (0)