NativeScript: Which TabViewItem is active - nativescript

in XML I have a TabView with two TabViewItems in NativeScript. Each one has it's own title. In my JavaScript code I now want to know which TabViewItem is active at the moment. How can I achieve this?
Thanks.

Related

How to make a drag & drop functionality in Xamarin forms?

I have a grid layout defined in Xaml in Xamarin Forms. I want to achieve a drag and drop functionality like in this example : http://gridstackjs.com/
Can someone please help to achieve this or provide an example ? I am totally stuck with this. Thanks.

Xamarin.Forms default navigation bar font

In Xamarin.Forms I have created a custom Navigation bar using a StackLayout and Labels for one of my pages. The other pages however are using the default navigation bar. I've tried to make the titles of the custom and default navigation bars look exactly the same but can't quite get it to match.
Is there a way to find out the font size and family of the default navigation bar in Xamarin.Forms?
Yes, there is! Xamarin.Forms is fully open-source, so you can inspect anything the code is doing on GitHub. The magic most likely happens inside the NavigationPage renderers, so check out Xamarin.Forms.Platform.[Target Platform]/Renderers/NavigationPageRenderer.cs.
But in your case this might be overkill, and you might be able to get the information you are interested in using the Xamarin Inspector while your app is running in debug mode.

Xamarin Forms - Disable loading spinner on ListView

I have a Xamarin forms app where I'm using ListViews to display some data, with pull to refresh enabled. When the ListView is pulled and starts the refresh it has its own spinner animation. However, this doesn't display when the page first loads, and so I've wired in a separate ActivityIndicator to indicate loading for just the first time. It's styled different though. I would prefer to use the ActivityIndicator, since it's what's used through the rest of the app, but I haven't found a way to disable the spinner animation on the ListView yet. Is it possible to disable it? Any suggestions would be appreciated, thanks!
There are a few ways I can think of to solve this.
Don't use Pull-to-refresh. Xamarin.Forms has this built in and you can't customize it without using renderers and altering controls. Instead, start your refresh another way (ToolbarItem, etc) and continue using your custom ActivityIndicator.
Customize the existing ListViews UIRefreshControl. You may be able to use a renderer or "Effect" to customize the RefreshControl being used by the native control. This would allow you to style it a little close to what your custom indicator looks like.
Change the color of the spinner. This is my least favorite option. You could workaround this by changing the color of the spinner to match the background so you don't see it.

Which toolbox does facebook app use

which toolbox is that?
I use ListView now, but if I click it, it looks like I choose it, not click it.
so I want to change.
Your question is very unclear but I'll share some information about ListView.
I don't know which facebook app is that but official Facebook App (not beta) is using ListView too AFAIK.You can customize ListView's Style and ItemTemplate to achieve that.
Theese 2 MSDN articles about ListView will help you.
https://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.listview.aspx
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj709922.aspx

Basic layout of appcelerator app

I creating my first appcelerator app and looking for some info on whether something is possible, and if so is it easy to implement.
I'm using Titanium SDK 2.0.1.
I'm trying to create a layout similar to the Stream window in the Google+ app for Android:
1: A large header (Can the navbar property of Ti.UI.createWindow be adjusted?)
2: Two tabs under the header (Would like to be able to adjust height of them if possible? Are there alternatives to Ti.UI.createTabGroup if this is not possible?)
The main content I can figure out easily enough I reckon.
Any examples or links on how to achieve this layout would be great.
Thanks
There is no way to do that type of NavBar in Android using the native Ti.UI.Window properties, but you can just create your own NavBar using a view and stick to the top of the window. For the tabs, I'd look at http://www.tomaspersson.com/2012/03/20/titanium-viewpager-module-now-available/ - I'm not sure it will have all the options you need, but it is a good starting point. Good luck!

Resources