How to achieve android Recyclerview kind of functionality in nativescript - nativescript

Let say i have 100 data in json object, Some data contain Video url, some contains Audio URL, Some data contains Extra table columns with Image Url.
In android i have Recycler View where i will create different fragments UI and based on the condition i'll load the UI and data and display on the listview.
But in nativescript i found only radist view which takes only similar type of data and display the list.
How to Achieve android's RecyclerView kind of functionality in Nativescript.
(Kindly anyone edit my question in a more generic way)

Use ListView or RadListView, both support configuring various templates and assign one to each list item based on conditions.
RadListView has more advanced features / support for various layouts out of the box, it uses RecyclerView on Android, where ListView uses android.widget.ListView.

Related

How to get data from server in Nativescript gridview?

I am able to load data from sqlServer using mat table in angular, but have no clue how to do same in nativescript?. I think GridView will work,but cant find source to load dynamic data.
If GridLayout is what you mean by GridView, it's just layout not responsible for loading data.
If you are looking to load list of items on screen, then ListView is what you need. If you like to show table kind of layout with multiple columns then you must design your item template with a GridLayout.
If you go with RadListView, you have different layouting option too.

Expandable List View In Xamarin IOS

i am tying to implement expandable list view as a popup view using Xamarin IOS.
Please find the below image.
Can any one give brief description to implement the above requirement.
Thanks you.
You could create a custom popup which has a tableview in it with expendable rows.
To create a custom popup you can something like this:
https://stackoverflow.com/a/19509582/5852062
When thats done, you should make the custom view use a tableview and make some rows expendable, something like this:
http://www.appcoda.com/expandable-table-view/
Note that this is in swift/objective-c but perfectly translatable to c#.

How to bind data to Picker inside ListView in Xamarin Forms

I am using Xamarin forms and my app has a list of items as a list view and each list item need to have a Picker. How do I bind data to the Picker controllers? Is there a way to access the child items inside a list view?
Just define your data template for the list view as normal (there are a lot of examples for this on the web), then inside the item template bind the desired item to a picker control (also a lot of examples out there).
There shouldn't be anything special about it.

Store App Dashboard: GridView and Multiple Charts

I'm working on a Store app that consists of several charts. I've already developed the charts and have them rendering using the chart control in the various forms.
I have been asked to bring these together in an app that allows the user to scroll left and right through each of the charts.
Every example I have found for using a GridView data binds the content of the GridView to item templates.
What I'm trying to get my head round is how I could please these chart controls directly in to a GridView.
Any help would be greatly appreciated.
Cheers,
Roy
As per my understanding of the question you need to have charts as items in a grid view.
If this is what you want, I have dome this before using charts from 3rd party toolkit.
You need ( may be variable sized) templates with each item having a different template of its own.
You need a items list with data for all the charts.
Then upon runtime you need to assign the template to each item.

Bind various panaroma/pivot items using MVVM

could someone help me with design/understanding the problem: what I need to achieve is page with Panorama/Pivot control, where its items (panos/pivots) will be set via binding, using standard MVVM pattern. Problem is I need to have different content (different user controls) on each pano/pivot, that means If I define a panorama/pivot item template, I doom all of them to be alike, which is not what I want.
I found this question here already asked: Databound windows phone panorama with MVVM design but its still not clear to me. Many thanks.
If you have a dynamic page count on panorama/pivot you could use selector to choose what template is right according to your content.
Implementing DataTemplateSelector
Also, Data Binding Pivot to MVVM may help you too
You could add a dependency property to the user control that you want to use as a data template, a dependency property named "Type" for example and depending on that property you can change the layout of your user control (data template) - for example you could have multiple grids inside your user control and you could show and hide them depending on the type.

Resources