Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit dba179a

Browse files
#699 Add ML Kit support (ML Kit demo, and further implementation of a few features)
1 parent 4829dc3 commit dba179a

46 files changed

Lines changed: 955 additions & 289 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
383 Bytes
Loading
681 Bytes
Loading
981 Bytes
Loading
391 Bytes
Loading
774 Bytes
Loading
1.08 KB
Loading

demo-ng/app/app.css

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ refer to http://docs.nativescript.org/ui/theme.
1111
*/
1212
@import 'nativescript-theme-core/css/core.light.css';
1313

14+
.tab-content {
15+
margin: 8;
16+
}
17+
1418
label {
1519
padding: 6;
1620
font-size: 14;
@@ -25,8 +29,8 @@ label {
2529

2630
button {
2731
background-color: #6494AA;
28-
padding: 8 12;
29-
margin: 4 10;
32+
padding: 8 10;
33+
margin: 4 8;
3034
font-size: 13;
3135
border-radius: 4;
3236
}
@@ -72,10 +76,10 @@ button {
7276
}
7377

7478
.mlKitCamera {
75-
/*border-radius: 130;*/
76-
border-width: 8;
77-
border-color: #ddd;
78-
width: 260;
79-
height: 260;
79+
/*border-radius: 20;*/
80+
/*border-width: 8;*/
81+
/*border-color: #ddd;*/
82+
width: 280;
83+
height: 280;
8084
margin-top: 16;
8185
}

demo-ng/app/app.module.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ import { NativeScriptModule } from "nativescript-angular/nativescript.module";
33
import { AppRoutingModule } from "./app.routing";
44
import { AppComponent } from "./app.component";
55

6-
import { ItemsComponent } from "./item/items.component";
7-
8-
import { registerElement } from "nativescript-angular/element-registry";
9-
10-
registerElement("MLKitBarcodeScanner", () => require("nativescript-plugin-firebase/mlkit/barcodescanning").MLKitBarcodeScanner);
11-
registerElement("MLKitFaceDetection", () => require("nativescript-plugin-firebase/mlkit/facedetection").MLKitFaceDetection);
12-
registerElement("MLKitTextRecognition", () => require("nativescript-plugin-firebase/mlkit/textrecognition").MLKitTextRecognition);
13-
146
@NgModule({
157
bootstrap: [
168
AppComponent
@@ -20,8 +12,7 @@ registerElement("MLKitTextRecognition", () => require("nativescript-plugin-fireb
2012
AppRoutingModule
2113
],
2214
declarations: [
23-
AppComponent,
24-
ItemsComponent
15+
AppComponent
2516
],
2617
schemas: [
2718
NO_ERRORS_SCHEMA

demo-ng/app/app.routing.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { NgModule } from "@angular/core";
2-
import { NativeScriptRouterModule } from "nativescript-angular/router";
32
import { Routes } from "@angular/router";
4-
5-
import { ItemsComponent } from "./item/items.component";
3+
import { NativeScriptRouterModule } from "nativescript-angular/router";
64

75
const routes: Routes = [
8-
{ path: "", redirectTo: "/items", pathMatch: "full" },
9-
{ path: "items", component: ItemsComponent }
6+
{path: "", redirectTo: "/tabs", pathMatch: "full"},
7+
{path: "tabs", loadChildren: "./tabs/tabs.module#TabsModule"}
108
];
119

1210
@NgModule({
13-
imports: [NativeScriptRouterModule.forRoot(routes)],
14-
exports: [NativeScriptRouterModule]
11+
imports: [NativeScriptRouterModule.forRoot(routes)],
12+
exports: [NativeScriptRouterModule]
1513
})
16-
export class AppRoutingModule { }
14+
export class AppRoutingModule {
15+
}

demo-ng/app/item/items.component.html

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

0 commit comments

Comments
 (0)