jamesmontemagno / xamarin.forms-monkeys Goto Github PK
View Code? Open in Web Editor NEWSimple list of monkeys (master/detail) in a xamarin.forms application
Simple list of monkeys (master/detail) in a xamarin.forms application
HI James,
when running the WP project on emulator the app crash on row 100 of App.xaml.cs at Debugger.Break();
(obviously an internal error, so apparently no clue). Fourther investigation on output window showed an error of type: 'System.IO.PathTooLongException' in mscorlib.ni.dll
Looking at the images's url of the monkeys, on the MonkeyViewModel I've found that two of these causes the error: Baboon and Spectacled Langur.
Maybe the path is really too long (do Xamarin implementation of image caching recreate a folder structure of the url?) or the % char is creating the issue. In any case, commenting those two monkes solve the issue.
As a side note, the WP UI rendering of the page is not really appealing, I hope next version of Xamarin.Forms will do a better rendering without the need of platform adjustments. But this is another story :-)
I have updated this project to Xamarin.Forms 4.1 and Xamarin.Essentials 1.2. However, the image circle only displays images on the iOS version and not on Android.
I would like to bind a page indicator which is basically some buttons on the top of the page.
The buttons successfully update and show the selected page, but they are unable to affect the carouselview through the property in the model.
I want to enable circular indicator ..how can i do that
I am using the pre release version of the carouselView (.2.3.0-pre2)
I am using the normal way of referencing the controls I want the carouselview to host as DataTemplates in a resource dictionary for the page hosting the carousel control. The problem is that the environment will create the controls when it sees them referenced in the resource dictionary. However, then it goes ahead and creates another set all over again. I see this by setting breakpoints on the constructors of my custom controls.
I have created an example that is as simple as possible to show this. Open the solutions, set breakpoints in the constructors for the custom views, and perhaps in the OnSelectTemplate method. You will see that each control is created, then the OnSelectTemplate override is called for each tab, creating a new instance again.
In my production code, the controls are much more complicated, and add propertyhandlers for when things change inside the property. I really do not want multiple instances, and handlers getting called twice for everything. I am sure this is not by design?
Best Regards
Peter Villadsen
CarouselDemo.zip
CarouselDemo.zip
If the swipe is not completed and left between two images, the app crashes immediately
I feel that Compiled Bindings does not respect the separation of responsibilities.
If you want to change ViewModels you have to change all references.
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Monkeys.Views.MonkeysPage"
xmlns:viewmodels="clr-namespace:Monkeys.ViewModels"
x:DataType="viewmodels:MonkeysViewModel"
Title="Monkeys">
</ContentPage>
Hi there,
I have a problem with Android version, it's just after I updated the package:
System.TypeLoadException: Could not load type 'Xamarin.Forms.Platform.CarouselViewRenderer' from assembly 'Xamarin.Forms.CarouselView, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00023] in /Users/builder/data/lanes/3819/c1d1c79c/source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:671
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000ca] in /Users/builder/data/lanes/3819/c1d1c79c/source/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:179
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x0001a] in /Users/builder/data/lanes/3819/c1d1c79c/source/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:153
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x0002a] in /Users/builder/data/lanes/3819/c1d1c79c/source/mono/mcs/class/referencesource/mscorlib/system/rttype.cs:5638
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00040] in /Users/builder/data/lanes/3819/c1d1c79c/source/mono/mcs/class/referencesource/mscorlib/system/activator.cs:201
at System.Activator.CreateInstance (System.Type type) [0x00000] in /Users/builder/data/lanes/3819/c1d1c79c/source/mono/mcs/class/referencesource/mscorlib/system/activator.cs:134
at Xamarin.Forms.Registrar1[TRegistrable].GetHandler (System.Type type) [0x00015] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\Registrar.cs:23 at Xamarin.Forms.Registrar
1[TRegistrable].GetHandler[TOut](System.Type type) [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\Registrar.cs:29
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00006] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:288
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:74
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:207
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:58
at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:337 at Xamarin.Forms.Platform.Android.VisualElementRenderer
1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:196
at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:129 at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289 at Xamarin.Forms.Platform.Android.ScrollViewContainer.set_ChildView (Xamarin.Forms.View value) [0x0002f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\ScrollViewContainer.cs:33 at Xamarin.Forms.Platform.Android.ScrollViewRenderer.LoadContent () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\ScrollViewRenderer.cs:219 at Xamarin.Forms.Platform.Android.ScrollViewRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x000a5] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\ScrollViewRenderer.cs:70 at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289 at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:74 at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:207 at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:58 at Xamarin.Forms.Platform.Android.VisualElementRenderer
1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:337
at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:196 at Xamarin.Forms.Platform.Android.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:129
at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Support.V4.App.FragmentManager fragmentManager) [0x00031] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:325
at Xamarin.Forms.Platform.Android.AppCompat.FragmentContainer.OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState) [0x00008] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FragmentContainer.cs:66
at Android.Support.V4.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_inflater, System.IntPtr native_container, System.IntPtr native_savedInstanceState) [0x00022] in <27c17fe440cf491ba8255bcefade6e02>:0
at at (wrapper dynamic-method) System.Object:efab62dc-cb3b-4d87-ab05-d0e45315689f (intptr,intptr,intptr,intptr,intptr)
I'm using the CarouselView along with Grial UI Kit in one of my Xamarin Forms App. I've got it work fine, in iOS & Android and it looks good in a portrait view on both the phones.
The issue arises in an iphone, when I change the orientation of the phone from portrait to landscape and then back to portrait. The page in the carousel view does not align itself to the left or right. I'm attaching some images that depict what happens:
From portrait to landscape:
From landscape to portrait:
This does not happen on an android device, just on iphone. Any assistance on this would be greatly appreciated.
Thanks
Noel
PS: I'm testing on an IPhone 6
I have got one page with a ListView, this ListView has got a template selector and one of this template is a CarouselView. In iOS and Android works perfectly but in UWP when I execute in my tablet the first time I can't see the CarouselView, if I resize the window it appears but the width is not correct.
When I resize more the window the width is always changing, if I use the same code out of ListView it works.
If you need more information tell me.
in your Monkeys-CarouselView project,
i must delete "[assembly: XamlCompilation(XamlCompilationOptions.Compile)]" in AssemblyInfo.cs.
this can work.
if i didn't delete that row, the running will be wrong.
is it new version xamarin problem?
I need to implement adding items to ViewModel dynamically and for this I've added a method to MonkeysViewModel:
public void AppendOne(){
MonkeysGrouped.Last().Add(new Monkey
{
Name = "Chimpanzee The Second",
Location = "West and Central Africa",
Details = "Chimpanzees, sometimes colloquially chimps, are two extant hominid species of apes in the genus Pan. The Congo River divides the native habitats of the two species",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Schimpanse_Zoo_Leipzig.jpg/220px-Schimpanse_Zoo_Leipzig.jpg"
});
}
and a button to call this method from MonkeysPage.
It works OK on Android, but on iPhone and iOS Simulator the App crashing silently just after call this method.
I try to make paged downloading list using Grouped ListView which adding items when the ListView scrolling down and can't make it on iPhone with XamarinForms.
Is it a bug in Forms or I did something wrong?
Works fine for iOS. Click and it works great for my image carousel, but in Android, the event is not raised at all. Haven't tested in UWP.
On another note, adding functionality like a slide timer or move to next image would be very helpful for those who want to customize more than just a basic image carousel for Xamarin Forms.
VS gives Error on line 2008098614. Expected 'ENCODING' but found 'utf-8'.
XS gives 'Reference' is expected Line 126, position 6
Can't we have indicators which are in https://github.com/alexrainman/CarouselView
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.