Back to Blog Home
← all posts

Telerik UI for NativeScript Preview 3 Release

December 18, 2015 — by Deyan Ginev

Views.png

Overview: What's inside

Telerik UI for NativeScript has just been updated introducing a brand new Calendar component, several major features in the Chart and ListView components, as well as numerous fixes and improvements.

Install it now!

Here's a short list of what's inside the latest version of the plugin:

Calendar

RadCalendar is a control based on the already mature RadCalendarView for Android and TKCalendar for iOS. Built on top of these controls, RadCalendar for NativeScript inherits familiar and powerful features used as building blocks in many modern mobile applications.

Here are some of the highlights:

Selection modes
You can choose from 4 distinct selection modes offered out of the box:

  • None - Selection is disabled for the whole Calendar.

  • Single - You can select only single date at a time.

  • Multiple - You can select as many dates as you need, that don’t need to be consecutive. Tapping a selected date will automatically deselect it.

  • RangeYou can select a range of dates by tapping on the first one and then tapping on the last one of the desired range:


calendar_range_selection.png

Event Source

RadCalendar supports displaying events as a part of its data source. Events are represented by the CalendarEvent structure providing settable title, start and end date and indication whether the event is a whole day event:

calendar_events.png

Chart

RadCartesianChart and RadPieChart have been improved in several areas.

Annotations
We added annotations that you can use to highlight certain areas on the plot. They can be used as markers for specific values. We support two types of annotations: grid line and plot band annotations. Using the styling options you could set the Z position and stroke width, color and the dash pattern used for drawing.

Selection
You can make your charts more interactive by enabling a selection. In this case you can select, deselect and handle the selection events of either data points or series. You can specify single or multiple selection for the chart and additionally set if the whole series should be selected or data points only. There are some events that could be handled:

seriesSelected, seriesDeselected - fired on (de)selection of any series
pointSelected, pointDeselected - fired on (de)selection of any data point of the serie

Pan & Zoom
If you need a chart that allows you to zoom in/out to more granular values you could enable zoom & pan behaviors setting the corresponding property of the horizontal or vertical axis: allowZoom, allowPan. There are two new events that will notify you for panning and zooming actions: chartZoomed and chartPanned.

We’ve added new properties for styling of point labels. Now you can set custom font, text format, text color and size.

ListView

RadListView receives a new API for managing selection. Now you can programmatically select, deselect and query all selected items. The following methods are part of the RadListView component in the latest release of Telerik UI for NativeScript:

- isItemSelected(item):boolean
- selectAll()
- deselectAll()
- getSelectedItems():Array<>
- selectItemAt(index)
- deselectItemAt(index)

Also, you can now block all UI updates and perform a batch data operation on the source collection without worrying about performance thanks to several new methods that RadListView exposes:

- suspendUpdates()
- resumeUpdates(refresh)
- updatesSuspended():boolean


With suspendUpdates you can instruct RadListView to stop tracking source collection changes until after resumeUpdates called. When calling resumeUpdates you can additionally request a UI refresh if needed by using the corresponding argument. The updatesSuspended returns true if a call to suspendUpdates has been made without a subsequent resumeUpdates call.

Exploring the code

There are a couple of ways to take a deeper look at the new APIs. We've updated our SDK examples and also made the source code of the official NativeScript demo application (still in BETA state) publicly available on GitHub. The online documentation website is also up-to-date covering all features with source examples.

Official Release Plans

We believe the current bits are stable enough and can be used in commercial apps because they are reusing the mature native components for iOS and Android. We plan to officially release the components suite in March.2016. Until then if you need a customer support please reach out to the Telerik forums where the team will help with providing a go-live version and answer any technical questions you have.

Please share the news with your Twitter followers!.