Xamarin UWP Listview ViewCell with images memory issue - image

I am working on UWP version of a Xamarin App and the ViewCell that I am working with in a Listview shows images just fine, but there it stops running after I scroll about half way through the list. If I use an ImageCell it works just fine but the images are not the right size. Anyone have any ideas? Also I am using FFImageloading in my project and this isn't helping with UWP. I have tried to implement a custom viewCell renderer similar to this but nothing shows

Try to change your image size and make it smaller, in android you will have problems because somehow there is no garbage collection.. I had the same issue..

Related

Static view above Shell Bottom Tabbar in Xamarin Forms

I'm using Shell in my Xamarin Forms app together with a bottom tabbar and no flyout menu.
Is it somehow possible to have a static view/control between the content page and the bottom tabbar?
(As an example, look at Spotifys mini-player that's constantly shown above the bottom tabbar)
I have tried to use a ControlTemplate in the ContentPage, but it works so-so.
When navigating between pages, the entire view is "slided away", thus it's noticeable that the control is not static and instead instantiated per each page.
Deactivating animations partially solves it but makes the application feel very static and is thus not an acceptable solution.
Anyone got an idea of how this can be solved?
It's quite easy to solve it with Xamarin.Android and Xamarin.Ios, but this needs to be done in Xamarin Forms.
Thanks in advance.

Workaround scrollview zoom for android #appcelerator

Hi I am building a magazine viewer and I need to zoom and drag the content pages. I am using scrollview but I guess the zoom works only for ios. Is there any workaround for this? I am using Titanium 5 sdk, and don't found modules that support it.
On Android you might be able to use http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ImageView-property-enableZoomControls

Why does Xamarin Forms Picker has transparent selector modal?

I have create a new view in order to be sure the opacity is not applied for some resource in my app, but for some reason it is not working in a clean enviroment neither.
I have checked the XF documentation and the modal with all the items should render in a solid color.
I have found the emulator was rendering a wrong modal for the picker, maybe it is caused by the default theme on the emulator. I have tested the app on a real device and seems to be ok.

How do I make an Image Slider in Xamarin Forms

What is the best way to make an image slider with Xamarin Forms. I've tried using a CarouselPage but it is too slow and uses too much memory.
You can use ImageGallery on Xamarin Forms Labs project
Like this:
https://www.dropbox.com/s/h51bunhgannsv9v/ImageGallery.mov

Xamarin.Forms custom loading gif as activity indicator

I would just like to know of something is possible as I am very new to Xamarin and I am on a time limit for an assignment. I don't mind some trial and error, but don't want to waste the time if it isn't possible
I want to have an animated gif as an activity indicator (it is a logo).
I have it working in a WebView - is it possible, in Xamarin,Forms to have this appear as an overlay while waiting on long running methods?
For example. if user clicks on a button, the app gets some info from a webservice then displays in a page. While waiting I would like to show the webview (or any other way to show an animagted gif).
So I am not asking for the code, but just if it is posible.
Thanks in advance
I was able to work this out
With the animated(loading) gif running in the WebView page I called a couple of async methods using following
await Task.WhenAll(method1(), method2());
await Navigate.PushAsync(new NextPage(var1, var2));
The laoding gif (which is an animated logo) runs until the tasks are complete then navigates to the next page
Using an ImageView apparently this doesn't look like its possible to playback animated Gif's as can be seen here http://forums.xamarin.com/discussion/17448/animated-gif-in-image-view.
So i very much doubt the ActivityIndicator would, if it could. In the ActivityIndicator I can't see any functionality to change the content of the what is shown when it is busy.
You could always create your own animated image view by creating a custom renderer instead however. It isn't particularly hard to cycle images at pre-determined gaps if you have a list of the images split up.
GIF images can be used in Xamarin forms to show custom activity indicator, since in Xamarin forms it is not possible to show GIF images directly web-view must be used. For android image must be placed inside assets folder and Build Action must be set to AndroidAsset. For iOS image must be placed inside resources and Build Action must be set to BundleResource. AbsoluteLayout can used for placing the image to center, IsBusy property of mvvm helpers nuget can used for controlling the visibility of the activity indicator. Dependency service must used for getting the image path. You can check this https://github.com/LeslieCorrea/Xamarin-Forms-Custom-Activity-Indicator for example.
Xamarin.Forms now supports .GIF, from version 4.4-pre3 and up on iOS, Android and UWP. Before using, first add the .GIF to the platforms projects, or as an embedded resource in the shared project and then use it like a regular image. The API on the Image control has been extended with the IsAnimationPlaying bindable property.
For e.g., loader.gif is added in all platform projects, then below code make it animating.
<Image Source="loader" IsAnimationPlaying="True" WidthRequest="36" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" />

Resources