|
| 1 | +<ActionBar class="action-bar"> |
| 2 | + <Label class="action-bar-title" text="Language identification"></Label> |
| 3 | +</ActionBar> |
| 4 | + |
| 5 | +<GridLayout> |
| 6 | + <MLKitTextRecognition |
| 7 | + width="100%" |
| 8 | + height="100%" |
| 9 | + processEveryNthFrame="60" |
| 10 | + [torchOn]="torchOn" |
| 11 | + (scanResult)="onTextRecognitionResult($event)"> |
| 12 | + </MLKitTextRecognition> |
| 13 | + |
| 14 | + <GridLayout rows="*, 320, *" columns="*, 5/6*, *"> |
| 15 | + <Label class="mask" row="0" col="0" colSpan="3"></Label> |
| 16 | + <Label class="mask" row="2" col="0" colSpan="3"></Label> |
| 17 | + <Label class="mask" row="1" col="0"></Label> |
| 18 | + <Label class="mask" row="1" col="2"></Label> |
| 19 | + <GridLayout row="1" col="1" rows="1/6*, *, 1/6*" columns="1/6*, *, 1/6*"> |
| 20 | + <Label class="frame-top-left" row="0" col="0"></Label> |
| 21 | + <Label class="frame-top-right" row="0" col="2"></Label> |
| 22 | + <Label class="frame-bottom-left" row="2" col="0"></Label> |
| 23 | + <Label class="frame-bottom-right" row="2" col="2"></Label> |
| 24 | + <StackLayout class="swing" row="0" col="0" colSpan="3"> |
| 25 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.1)"></Label> |
| 26 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.2)"></Label> |
| 27 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.3)"></Label> |
| 28 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.4)"></Label> |
| 29 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.5)"></Label> |
| 30 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.6)"></Label> |
| 31 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.7)"></Label> |
| 32 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.8)"></Label> |
| 33 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 0.9)"></Label> |
| 34 | + <Label height="1" marginBottom="1" borderBottomWidth="1" borderColor="rgba(81, 184, 237, 1)"></Label> |
| 35 | + </StackLayout> |
| 36 | + </GridLayout> |
| 37 | + |
| 38 | + <ListView separatorColor="transparent" row="0" rowSpan="3" col="0" colSpan="3" [items]="possibleLanguages" class="m-t-20" backgroundColor="transparent"> |
| 39 | + <ng-template let-item="item"> |
| 40 | + <StackLayout orientation="horizontal"> |
| 41 | + <Label class="mlkit-result" textWrap="true" [text]="item.languageCode"></Label> |
| 42 | + <Label class="mlkit-result" textWrap="true" [text]="item.confidence"></Label> |
| 43 | + </StackLayout> |
| 44 | + </ng-template> |
| 45 | + </ListView> |
| 46 | + </GridLayout> |
| 47 | + |
| 48 | + <GridLayout rows="auto" columns="auto, auto" horizontalAlignment="right" class="m-t-4 m-r-8"> |
| 49 | + <Label col="0" text="Torch" class="c-white" [class.disabled]="!torchOn"></Label> |
| 50 | + <Switch col="1" [checked]="torchOn" (checkedChange)="toggleTorch($event)"></Switch> |
| 51 | + </GridLayout> |
| 52 | + |
| 53 | +</GridLayout> |
0 commit comments