Skip to content

Commit c309971

Browse files
authored
Merge pull request #284 from jcassidyav/just-paths
fix(tabs) Change image colors on selected tab in IOS and android
2 parents 1e017bf + 74e37af commit c309971

File tree

27 files changed

+160
-539
lines changed

27 files changed

+160
-539
lines changed

demo-ng/package.json

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
22
"description": "NativeScript Application",
3+
"main": "src/main.ts",
34
"dependencies": {
4-
"@angular/animations": "~11.2.0",
5-
"@angular/common": "~11.2.0",
6-
"@angular/compiler": "~11.2.0",
7-
"@angular/core": "~11.2.0",
8-
"@angular/forms": "~11.2.0",
9-
"@angular/platform-browser": "~11.2.0",
10-
"@angular/platform-browser-dynamic": "~11.2.0",
11-
"@angular/router": "~11.2.0",
12-
"@nativescript/core": "8.0.0-alpha.8",
13-
"@nativescript/angular": "ns8",
5+
"@mdi/font": "4.9.95",
6+
"@angular/animations": "~11.2.7",
7+
"@angular/common": "~11.2.7",
8+
"@angular/compiler": "~11.2.7",
9+
"@angular/core": "~11.2.7",
10+
"@angular/forms": "~11.2.7",
11+
"@angular/platform-browser": "~11.2.7",
12+
"@angular/platform-browser-dynamic": "~11.2.7",
13+
"@angular/router": "~11.2.7",
14+
"@nativescript/core": "8.0.0",
15+
"@nativescript/angular": "~11.8.0",
1416
"@nativescript-community/ui-material-activityindicator": "file:../packages/activityindicator",
1517
"@nativescript-community/ui-material-bottomsheet": "file:../packages/bottomsheet",
1618
"@nativescript-community/ui-material-bottomnavigationbar": "file:../packages/bottomnavigationbar",
@@ -25,19 +27,20 @@
2527
"@nativescript-community/ui-material-snackbar": "file:../packages/snackbar",
2628
"@nativescript-community/ui-material-textfield": "file:../packages/textfield",
2729
"@nativescript-community/ui-material-tabs": "file:../packages/tabs",
28-
"@nativescript/theme": "~3.0.0",
30+
"@nativescript/theme": "~3.0.1",
2931
"reflect-metadata": "~0.1.13",
30-
"rxjs": "~6.6.3",
31-
"zone.js": "~0.11.0"
32+
"rxjs": "~6.6.7",
33+
"zone.js": "~0.11.4"
3234
},
3335
"devDependencies": {
34-
"@angular/cli": "~11.2.0",
35-
"@angular/compiler-cli": "~11.2.0",
36-
"@nativescript/android": "7.0.1",
37-
"@nativescript/ios": "7.2.0",
38-
"@nativescript/types": "~7.3.0",
39-
"@nativescript/webpack": "~4.1.0",
40-
"@ngtools/webpack": "~11.2.0"
36+
"@angular/cli": "~11.2.7",
37+
"@angular/compiler-cli": "~11.2.7",
38+
"@nativescript/android": "8.0.0",
39+
"@nativescript/ios": "8.0.0",
40+
"@nativescript/types": "~8.0.0",
41+
"@nativescript/webpack": "beta",
42+
"@ngtools/webpack": "~11.2.6",
43+
"typescript": "~4.0.0"
4144
},
4245
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
4346
"readme": "NativeScript Application"

demo-ng/src/app.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
@import '~@nativescript/theme/css/core.css';
2-
@import '~@nativescript/theme/css/default.css';
1+
@import '@nativescript/theme/css/core.css';
2+
@import '@nativescript/theme/css/default.css';
3+
.mdi {
4+
font-family: 'materialdesignicons-webfont', 'Material Design Icons';
5+
}
6+
MDTabStrip {
7+
selected-item-color: #bff937;
8+
un-selected-item-color: #404040;
9+
highlight-color: #4CFFFF;
10+
}
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
<MDTabs selectedIndex="1">
2-
<!-- The bottom tab UI is created via TabStrip (the containier) and TabStripItem (for each tab)-->
3-
<TabStrip>
4-
<TabStripItem>
2+
<!-- The bottom tab UI is created via MDTabStrip (the containier) and MDTabStripItem (for each tab)-->
3+
<MDTabStrip >
4+
<MDTabStripItem>
55
<Label text="Home"></Label>
66
<Image src="res://ic_home"></Image>
7-
</TabStripItem>
8-
<TabStripItem>
7+
</MDTabStripItem>
8+
<MDTabStripItem>
99
<Label text="Account"></Label>
1010
<Image src="res://ic_view_list"></Image>
11-
</TabStripItem>
12-
<TabStripItem>
11+
</MDTabStripItem>
12+
<MDTabStripItem>
1313
<Label text="Search"></Label>
14-
<Image src="res://ic_menu"></Image>
15-
</TabStripItem>
16-
</TabStrip>
14+
<Image src="font://&#xF349;" class="mdi"></Image>
15+
</MDTabStripItem>
16+
</MDTabStrip>
1717

18-
<!-- The number of TabContentItem components should corespond to the number of TabStripItem components -->
19-
<TabContentItem>
18+
<!-- The number of MDTabContentItem components should corespond to the number of MDTabStripItem components -->
19+
<MDTabContentItem>
2020
<GridLayout>
2121
<Label text="Home Page" class="h2 text-center"></Label>
2222
</GridLayout>
23-
</TabContentItem>
24-
<TabContentItem>
23+
</MDTabContentItem>
24+
<MDTabContentItem>
2525
<GridLayout>
2626
<Label text="Account Page" class="h2 text-center"></Label>
2727
</GridLayout>
28-
</TabContentItem>
29-
<TabContentItem>
28+
</MDTabContentItem>
29+
<MDTabContentItem>
3030
<GridLayout>
3131
<Label text="Search Page" class="h2 text-center"></Label>
3232
</GridLayout>
33-
</TabContentItem>
33+
</MDTabContentItem>
3434
</MDTabs>

demo-ng/src/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
// this import should be first in order to load some required settings (like globals and reflect-metadata)
22
import { platformNativeScriptDynamic } from "@nativescript/angular";
3-
3+
import { themer } from '@nativescript-community/ui-material-core';
44
import { AppModule } from './app/app.module';
55

6+
if (global.isIOS) {
7+
themer.setPrimaryColor('#bff937');
8+
9+
}
10+
611
// A traditional NativeScript application starts by initializing global objects,
712
// setting up global CSS rules, creating, and navigating to the main page.
813
// Angular applications need to take care of their own initialization:

demo-ng/tsconfig.json

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
{
22
"compilerOptions": {
3-
"module": "esnext",
4-
"target": "es2017",
5-
"moduleResolution": "node",
6-
"removeComments": true,
7-
"declaration": false,
8-
"noLib": false,
9-
"skipLibCheck": true,
10-
"experimentalDecorators": true,
11-
"emitDecoratorMetadata": true,
12-
"noEmitHelpers": true,
13-
"noEmitOnError": true,
14-
"lib": [
15-
"es2017",
16-
"dom"
17-
],
18-
"baseUrl": ".",
19-
"paths": {
20-
"~/*": [
21-
"src/*"
22-
]
23-
}
3+
"module": "esnext",
4+
"target": "es2017",
5+
"moduleResolution": "node",
6+
"experimentalDecorators": true,
7+
"emitDecoratorMetadata": true,
8+
"noEmitHelpers": true,
9+
"noEmitOnError": true,
10+
"skipLibCheck": true,
11+
"lib": ["es2017", "dom"],
12+
"baseUrl": ".",
13+
"paths": {
14+
"~/*": ["src/*"],
15+
"@/*": ["src/*"]
16+
}
2417
},
25-
"exclude": [
26-
"node_modules",
27-
"platforms"
28-
]
29-
}
18+
"include": ["src/tests/**/*.ts", "src/**/*.ios.ts", "src/**/*.android.ts"],
19+
"files": ["./src/main.ts", "./references.d.ts"],
20+
"exclude": ["node_modules", "platforms", "e2e"]
21+
}
22+

demo-ng/tsconfig.tns.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)