How can I hide scrollbar for ScrollView in NativeScript? - nativescript

I've been looking back and forth on how can I hide scrollbar for a ScrollView in NativeScript Angular from the html file rather than typescript or JavaScript but I couldn't find it.
What have I tried already:
This thread shows a way to do it by accessing the native API but it's different for both iOS and Android. I'm looking for a cross platform solution.
I've used this plugin but again I'm looking for a much simpler way like some sort of a attribute <ScrollView> tag.
Environment:
Node: 10.16
npm: 6.9.0
NativeScript: 5.4.0

I've found a way to achieve this. Use following approach:
<ScrollView scrollBarIndicatorVisible="false">
...
</ScrollView>
I hope that you found it usefull. Reference API
Followings have been tested:
Platforms: Android, iOS
Frameworks: NativeScript - Angular, JavaScript, TypeScript
NativeScript Version: 3, 4, 5

Related

Xamarin Community Toolkit MediaElement not showing an Playback controls or play the video in the source UWP

Updated - This issue only happens on UWP - Works fine on Android haven't tested it on IOS. I would assume it would work just as fine. The issue is with Xamarin.Community.Toolkit not working with UWP
I've just started learning Xamarin for App development. I'm mostly running UWP for testing as emulators slow down my machine. After researching the best tool to play videos using Xamarin I found the Xamarin Community Toolkit. Followed the basic steps required to get MediaElement on screen and added basic properties to it.
I got the Xamarin tutorial basic video used in a tutorial inside the source. I know it works because you can copy the link and paste it into a browser and you'll get it playing.
After messing around with different versions I can't get this to work. No controls want to show up either nor the video itself. I have run out of ideas please someone HELP.
Running a blank template for this practice Hello World Project.
Using all of the latest versions possible. Project was created 20/09/2022 So I would assume everything latest version.
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
x:Class="HelloWorldXamarin.MainPage"
Title="This is a Hello World Practice Project">
<xct:MediaElement Source="https://sec.ch9.ms/ch9/5d93/a1eab4bf-3288-4faf-81c4-294402a85d93/XamarinShow_mid.mp4"
BackgroundColor="LightBlue"
HeightRequest="300"
VerticalOptions="FillAndExpand"
ShowsPlaybackControls="True"
AutoPlay="True"/>
This is what I get on my screen.
Unfortunately, the situation you describe is actually a bug for UWP, and you can check this link.
By the way, I test the code you provided. But It doesn't matter which version I change Xamarin Community Toolkit to.

Default WebView for Xamarin Forms iOS?

So I'm trying to migrate from using UIWebView to WKWebView for Xamarin Forms iOS but I have a few questions because this all seems to be pretty new and none of the resources are helping me online.
https://github.com/xamarin/Xamarin.Forms/pull/7367
I came across this link though, and apparently the WKWebview is not the default for Xamarin.Forms for 4.0+ and so,
1) I'm currently using Xamarin Forms 3.4.0.x. From my understanding, is all I have to do to get the WKWebView upgrading to 4.4.0.991477, the latest build?
2) Follow up to question 1, how would I not change any code because my cs files contain "using UIKit", which is the namespace for UIWebView, is it not?
3) In this link, it seems like there is no design change at all.. but I thought that WKWebView contained a URL link at the top of the page, which UIWebView does not, which is correct?
Thanks!
1) If you have only cross-platform code, then yes there is nothing that you need to worry about, it just works.
2) As you suggest that you have UIKit in your code, then obviously that won't work. UIKit is not Xamarin.Forms API and basically you don't use Xamarin.Forms in this case, but rather Xamarin.iOS.
3) Neither of those controls display URL.

How to use COVALENT UI with nativescript angular app

I wanted to use covalent ui components with a nativescript angular app. Is that possible? I am a newbie with nativescript development. Can we use any angular library with nativescript?
You can not use covalent ui components on nativescript as those work only on web.
You can search here for ui components and other plugins
And you can use angular libraries as long as they don't use DOM api's, for example NGRX will work like a charm ;)

NativeScript Webview - How to see console outputs

I'm building an app in NativeScript {N} where I'm implementing a webview.
All of this is working fine, but in my webpage, I would like to get some JS debug statements. How can I see the webview console.log output?
Previously I was able to "inspect" it through Safari, but that option is not presented in the "Develop" menu anymore.
If like me you could not figure out how to do this using the webview proivded by nativescript you'll need to install this plugin to get what you need.
https://github.com/shripalsoni04/nativescript-webview-interface
I provides a lot more features more than the stock. Basically, it allows you to emit events to the android from the webview layer. The author provides a good tutorial on this.

Best practice for loading images on nativescript angular iOS

I'm building out an iPhone and Android app using nativescript angular.
Since the app will be loading images in a list view, I have the nativescript fresco plugin to take care of loading the images and it works beautifully btw. Unfortunately this only take care of Android side.
I was wondering what other developers use when developing for nativescript apps for IOS. 
clarification: what I'm really trying to figure out is what should I use to replace fresco when developing for ios.
Also, I now have all these Fresco tags for all the images for android. But what do you do when you are ready to develop for IOS? Do I need to have *ngIF statements on all of them for android and use default Image tags for IOS?
You can use the <android></android> or <ios></ios> tags for platform specific views
e.g
<android>
<FrescoDrawee [imageUri]="someImage"></FrescoDrawee>
</android>
<ios>
<Image [src]="someImage"></Image>
</ios>
There is also the SDWebImage library which can automatically manage caching.
http://cocoadocs.org/docsets/SDWebImage/4.1.2/

Resources