NativeScript android BetterVideoPlayer implement

Issue I am trying to implement BetterVideoPlayer (implementation ‘com.github.halilozercan:BetterVideoPlayer:1.2.alpha1’) for NativeScript Android. So, in an Angular project I have created separate component like this: import { View } from “tns-core-modules/ui/core/view”; declare var com, android; export class BetterPlayer extends View {

Continue reading

How to clear selected value from RadAutoCompleteTextView

Issue I have a RadAutoCompleteTextView with remote data look like below <StackLayout> <RadAutoCompleteTextView #autocomplete [items]=”dataItems” suggestMode=”Suggest” displayMode=”Plain”> <SuggestionView tkAutoCompleteSuggestionView suggestionViewHeight=”300″> <ng-template tkSuggestionItemTemplate let-item=”item”> <StackLayout orientation=”vertical” padding=”10″> <Label [text]=”item.text”></Label> </StackLayout> </ng-template> </SuggestionView> </RadAutoCompleteTextView> <Button text=”clear” (tap)=”clear()”> </Button> </StackLayout> On button click,

Continue reading

How to remove button borders inside Nativescript CardView on Android?

Issue I’m having some difficulty removing the border on a button that is inside the Nativescript-CardView plugin. html <CardView #item elevation=”50″ margin=”10″> <GridLayout rows=”auto, auto, auto” columns=”*, *, *”> <Image src=”~/images/shop.jpg” stretch=”aspectFit” colSpan=”3″ row=”0″ ></Image> <Button text=”&#xE88E;” class=”Material btn” row=”1″

Continue reading

show/hide password text using Nativescript

Issue I want to show/hidden password text in my login form. I have a code like below. I try this code: <GridLayout margin=”10″ verticalAlignment=”center” backgroundColor=”#ffffff”> <StackLayout margin=”10″ verticalAlignment=”center” [formGroup]=”signUpForm” padding=”15″> <StackLayout class=”input-field”> <TextField formControlName=”username” hint=”Username”></TextField> </StackLayout> <StackLayout class=”input-field”> <TextField formControlName=”password”

Continue reading

Listen to scroll events of RadListView

Issue I need to bind some logic to RadListView’s scrollOffset (change some opacity depending on how far user has scrolled), so I want to listen to scrolledEvent, as documentation says – https://docs.nativescript.org/angular/ui/professional-ui-components/ng-ListView/scrolling I wanted to bind to it like to

Continue reading

Nativescript: How to create Angular routerlink-like behavior

Issue Right now I have this component, it is a search function component: Here is the code for it: <StackLayout> <StackLayout class=”form”> <StackLayout class=”input-field”> <TextField hint=”Tournament Name” [(ngModel)]=”query”></TextField> </StackLayout> <Button text=”Search” (tap)=”onSubmit()”></Button> </StackLayout> <Scrollview height=”80%”> <StackLayout> <GridLayout *ngFor=”let result of

Continue reading

Nativescript testing – tests/example.ts is missing from the TypeScript compilation

Issue I have an Angular flavoured Nativescript project. After follwoing the steps from https://docs.nativescript.org/tooling/testing/testing I encountered the following error: ERROR in ./src/tests/example.ts Module build failed (from ../node_modules/@ngtools/webpack/src/index.js): Error: /home/…./src/tests/example.ts is missing from the TypeScript compilation. Please make sure it is

Continue reading

NativeScript limitations

Issue I´m evaluating differents mobile frameworks, and I think that nativescript is a good option. But I don’t know if exists limitations on the development process. For example I had limitations on the styling (and that’s not so important), but

Continue reading

Injected Page is null

Issue After upgrading an angular nativescript project to the current versions of angular, typescript, tns, etc.. I’m getting a runtime error stating: TypeError: Cannot set property ‘actionBarHidden’ of null at new AppComponent… The code that previously worked to hide the

Continue reading

NativeScript ListView isn't updating

Issue So I have a ListView like this <ListView height=”150″ [items]=”countries”> <ng-template let-country=”item”> <Image src={{country.imgSrc}}></Image> <Label text={{country.name}}></Label> </ng-template> </ListView> I have a subscription to an Observable that is returning an array of countries. countries: any[] = []; ngOnInit() { this.countryService.countriesUpdated.subscribe(

Continue reading

How to get the reference of a Nativescript angular modal's native view window?

Issue I am trying to set Immersive mode only in modal page but when I do the below in ngOnInit of the modal component Application.android.foregroundActivity.getWindow().getDecorView().setSystemUiVisibility( // tslint:disable-next-line:no-bitwise View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar | View.SYSTEM_UI_FLAG_IMMERSIVE ); It

Continue reading

How to use DatePicker in NativeScript dialogs

Issue I have a DatePicker in one of NativeScript/Angular App like below. <StackLayout class=”m-x-10 form” [formGroup]=”myForm”> <DockLayout stretchLastChild=”true”> <Label text=”Date” class=”m-x-auto m-y-auto” dock=”left”></Label> <StackLayout class=”input-field”> <DatePicker loaded=”onDatePickerLoaded” formControlName=”transDate” minDate=”{{ minDate }}” maxDate=”{{ maxDate }}”></DatePicker> </StackLayout> </DockLayout> </StackLayout> I want to

Continue reading

NativeScript Angular BottomSheet

Issue Hello everyone good day, I have a running angular project that uses the angular material bottomsheet component my question now is; how to implement same behaviour in nativescript angular. Thank you for replying Solution You may use nativescript-cfalert-dialog tns

Continue reading

Nativescript (typescript) How do I access/get the instance/reference of a component from a different component?

Issue I am trying to access the component(Class instance) of NavigationButton and SearchBar in ActionBar from the component(Class instance) of a tabItem in a TabView. How do I do this? <ActionBar color=”black” title=””> <NavigationButton #navBtn text=”Go Back” android.systemIcon=”ic_menu_back” (tap)=”goBack()” [visibility]=”navBtnVisibility”></NavigationButton>

Continue reading