Tag: javascript

Fill Empty Space With UI Elements Using The NativeScript GridLayout

January 29, 2016 Nic Raboy

So recently I found myself needing to create a screen in a NativeScript Android and iOS app that had a ListView that sat below, or above, a Label UI element. The problem I faced was that there were issues with element sizing. On my first attempt I ended up with a Label and ListView that only took up a small portion of the screen, when I wanted the ListView to take up all remaining space. This is where the GridLayout comes in with its ability to have custom row and column sizing.

Using a GridLayout you can specify how rows and columns are fit around the screen.

Read More

Use The Android Palette Class With NativeScript

January 19, 2016 Brad Martin

I’m a big fan of Material Design, the ripple (ink) effect and the use of color are my favorites. According to the Material Design spec in regards to color:

Color in material design is inspired by bold hues juxtaposed with muted environments, deep shadows, and bright highlights. Material takes cues from contemporary architecture, road signs, pavement marking tape, and athletic courts. Color should be unexpected and vibrant.

The other day I wanted to change the action bar color to style with a user’s profile picture. Since there is no way to guess what color the picture is going to be, the Palette class and its methods to extract colors from the image were exactly what I needed.

Read More

My Experience Developing with Ionic Framework

January 18, 2016 Nic Raboy

I’ve been developing with Ionic Framework since it was beta at the beginning of 2014. Since then I’ve published two applications and done other things that I cannot talk about due to non-disclosure agreements that I’ve signed over the years.

I wanted to take the time to do something that I should have done after my first year, but never got around to. I want to share my experience with using Ionic Framework so anyone who reads this can get a rough idea about what they’re getting themselves into with the platform.

Read More

Include External JavaScript Libraries In An Angular TypeScript Project

January 8, 2016 Nic Raboy

I’ve been a JavaScript developer for a while now, but with the release of Angular, I’ve been inspired to pick up TypeScript. However, what happens when I want to use one of my hundreds of available external JavaScript libraries in my project?

I’m going to share how to use your favorite JavaScript libraries in a TypeScript Angular application.

Read More

Create A Toast Notification In Android With NativeScript

December 25, 2015 Nic Raboy

Toast notifications are a common thing in Android applications. They are convenient because you can display a message to a user and have it disappear shortly after without blocking any of the UI that might exist within the application. I already demonstrated how to display these notifications in an Ionic Framework application, but this time I’m changing gears to explain how it is done using Telerik NativeScript.

I wanted to start off by saying that I was inspired to write this article after reading Brad Martin’s post regarding the Snackbar notification in NativeScript. Both are common and useful ways to display notifications in mobile apps.

Read More

Waiting For A Loop Of Async Functions To Finish In Node.js

December 21, 2015 Nic Raboy

At the moment Node.js is my web development language of choice, but occasionally I come across something that really grinds my gears. I sometimes find that I’ve fallen into an async hell that screws up a lot of things. For example, maybe I’ve designed an API endpoint that makes a few requests to external services. Before returning data to the client (user), manipulations must be done on the external service data requested. How do we do all this?

Let’s take a look how we would cover these scenarios.

Read More

Find The Application Version In Your NativeScript App

December 18, 2015 Nic Raboy

With all the buzz around NativeScript, I figured it was about time that I demonstrate how to access native features of a device without the use of any plugins. To start off slow I decided it might be convenient to see how to obtain the application version number and display it within the application.

To be clear, there are plugins to do all this for you, but the point I’m trying to prove is how easy it is to access core features of iOS and Android with limited knowledge of both.

Read More