在 xamarin 中使用交错网格

Use Staggered Grid in xamarin

我必须在我的 Xamarin android 应用程序中使用交错网格视图。 我发现了许多带有本机代码的示例,但它们使用的是本机库。 喜欢 https://github.com/etsy/AndroidStaggeredGrid https://github.com/maurycyw/StaggeredGridView

但我想在 Xamarin 中使用,那里有任何库或组件或任何示例吗?

您是否尝试使用 Google (https://www.google.com/search?q=xamarin+AndroidStaggeredGrid&oq=xamarin+AndroidStaggeredGrid)?哈哈!开玩笑!

我遇到了同样的问题,我认为你(我们)有多种选择(请在做出决定之前先阅读所有解决方案)

  1. 第一个解决方案是尝试 "Binding a Java Library",我的意思是从 C# 中使用 .JAR。 Xamarin 对此有非常好的文档 (http://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/binding_a_java_library_(.jar)/)
  2. 其次可能是将 JAVA 代码移植到 C#。 Xamarin 对此也有很好的文档 (http://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/porting_java_to_csharp/). I did this several times for iOS to c# (I wrote several articules in my blog http://www.hernanzaldivar.com). You have TOOLS TO HELP YOU CONVERT JAVA TO C# SOURCE CODE (http://codecall.net/2014/03/27/best-tools-to-convert-java-to-c-source-code/). Here you also have a good read for this (http://blog.xamarin.com/android-in-c-sharp/)
  3. 最后,您有了我要遵循的本机解决方案。解决方案在这条推文 (https://twitter.com/kphillpotts/status/576130296338321408). Here you have a detail article "Xamarin Android - A Staggered Grid Layout, via a RecyclerView. And no Java bindings!" (http://blog.wislon.io/posts/2015/03/05/xamarin-android-staggered-grid-layout/) 中,包含所有源代码

我希望你觉得这有用 来自阿根廷的问候 埃尔南

https://twitter.com/vackup http://www.hernanzaldivar.com/