Skip to content

Commit 5ace9ac

Browse files
committed
Merge branch 'master' of github.com:Akylas/nativescript-material-components
2 parents 0f65246 + a4677e4 commit 5ace9ac

File tree

6 files changed

+23
-9
lines changed

6 files changed

+23
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Build beautiful, usable products using Material Components for NativeScript.
2323
## Android migration to AndroidX
2424

2525
For Material Components to work correctly with {N} 6 and AndroidX you need to update your android app theme.
26-
inside ```App_ressources/android/res/values/styles.xml``` replace all occurences of ```Theme.AppCompat``` with ```Theme.MaterialComponents```
26+
inside ```App_resources/android/res/values/styles.xml``` replace all occurences of ```Theme.AppCompat``` with ```Theme.MaterialComponents```
2727

2828
## Contribution
2929

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<GridLayout class="p-20">
2-
<Label class="h1 text-center" text="Thrid tab" textWrap="true"></Label>
2+
<Label class="h1 text-center" text="Third tab" textWrap="true"></Label>
33
</GridLayout>

demo-vue/app/examples/BottomNavigationBar.vue

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@
55
</ActionBar>
66
<GridLayout rows="*, auto" backgroundColor="blue">
77
<StackLayout class="page" backgroundColor="white" row="0">
8-
<!-- <ns-first-tab *ngSwitchDefault></ns-first-tab> -->
9-
<!-- <ns-third-tab *ngSwitchCase="2"></ns-third-tab> -->
8+
<GridLayout class="p-20" v-if="currentTab === 0"> -->
9+
<Label class="h1 text-center" text="First tab" textWrap="true"></Label>
10+
</GridLayout> -->
11+
<GridLayout class="p-20" v-if="currentTab === 2">
12+
<Label class="h1 text-center" text="Third tab" textWrap="true"></Label>
13+
</GridLayout>
1014
</StackLayout>
11-
<MDBottomNavigationBar row="1" activeColor="red" @loaded="onbottomNavigationBarLoaded">
15+
<MDBottomNavigationBar
16+
row="1"
17+
activeColor="red"
18+
@loaded="onbottomNavigationBarLoaded"
19+
@tabPressed="onBottomNavigationTabPressed"
20+
@tabSelected="onBottomNavigationTabSelected"
21+
@tabReselected="onBottomNavigationTabReselected"
22+
>
1223
<MDBottomNavigationTab title="First" icon="res://ic_home" activeColor="green"/>
1324
<MDBottomNavigationTab title="Second" icon="res://ic_view_list" isSelectable="false" />
1425
<MDBottomNavigationTab title="Third" icon="res://ic_menu" inactiveColor="brown"/>
@@ -30,7 +41,8 @@ export default Vue.extend({
3041
name: 'BottomNavigationBar',
3142
data() {
3243
return {
33-
title: title
44+
title: title,
45+
currentTab: 0
3446
};
3547
},
3648
methods: {
@@ -51,6 +63,7 @@ export default Vue.extend({
5163
onBottomNavigationTabSelected(args: TabSelectedEventData): void {
5264
console.log(`old tab index: ${args.oldIndex}`);
5365
console.log(`selected tab index: ${args.newIndex}`);
66+
this.currentTab = args.newIndex;
5467
},
5568
5669
onBottomNavigationTabReselected(args: TabReselectedEventData): void {
@@ -59,4 +72,4 @@ export default Vue.extend({
5972
}
6073
}
6174
});
62-
</script>
75+
</script>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"@commitlint/config-conventional": "^8.3.4",
5757
"@nativescript/angular":"8.21.0",
5858
"@nativescript/core":"6.5.1",
59+
"@types/node": "14.0.4",
5960
"husky": "^4.2.3",
6061
"lerna": "^3.20.2",
6162
"nativescript-vue": "2.5.1",

packages/nativescript-material-bottomnavigationbar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tns plugin add nativescript-material-bottomnavigationbar
3232

3333
### Usage
3434

35-
Before start using the plugin you need to add the icons for android & iOS in your `App_Resources` directory.
35+
Before start using the plugin you need to add the icons for Android & iOS in your `App_Resources` directory.
3636

3737
#### XML
3838

src/bottomsheet/angular/bottomsheet.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class BottomSheetService {
121121
const detachedLoaderFactory = factoryResolver.resolveComponentFactory(DetachedLoader);
122122
const childInjector = this.createChildInjector(bottomSheetParams, viewContainerRef);
123123

124-
return viewContainerRef.createComponent(detachedLoaderFactory, -1, childInjector, null);
124+
return viewContainerRef.createComponent(detachedLoaderFactory, 0, childInjector, null);
125125
}
126126

127127
private async loadComponent(type: Type<any>): Promise<ViewWithBottomSheetBase> {

0 commit comments

Comments
 (0)