xamarin.android

MVVMCross Bindings in Android

允我心安 提交于 2019-12-17 20:23:13
问题 I'm developing a cross-platform App starting it in android. I've found your MVVMCross project and I'm trying to get into it. Right now I'm totally new to it and don't know how to bind my WebService-Results to my ListView. Here a bit of XAML as example how I'm trying it: xmlns:mobsales="http://schemas.android.com/apk/res/MobSales.DroidUI" ... android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" mobsales:MvxItemTemplate="@layout/listitem

MVVMCross Bindings in Android

二次信任 提交于 2019-12-17 20:15:07
问题 I'm developing a cross-platform App starting it in android. I've found your MVVMCross project and I'm trying to get into it. Right now I'm totally new to it and don't know how to bind my WebService-Results to my ListView. Here a bit of XAML as example how I'm trying it: xmlns:mobsales="http://schemas.android.com/apk/res/MobSales.DroidUI" ... android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" mobsales:MvxItemTemplate="@layout/listitem

JsonSerializationException 'Unable to find a constructor' on Xamarin.Android

↘锁芯ラ 提交于 2019-12-17 20:05:58
问题 I have this very odd problem with my code, and it's a pretty new problem, considering I didn't have it half a year ago. Long story short, I've made an app in Xamarin, and released it about half a year ago, on all 3 stores (App Store, Google Play and Microsoft Store). Yesterday a user reported a problem with the Android app, and after I got that fixed and recompiled, I'm now encountering a new error with Json.NET The exception is Newtonsoft.Json.JsonSerializationException: Unable to find a

Why is my custom ButtonRenderer not working?

主宰稳场 提交于 2019-12-17 19:54:33
问题 I'm trying to create a custom ButtonRenderer for Xamarin.Forms. Here is a simple test I've been trying to put up together following some tutorials, but I can's seem to make it work. Here is my .xaml page: <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="TestProject.MainPage"> <ContentPage.Content> <Button VerticalOptions="Center" HorizontalOptions="Center"></Button> </ContentPage

What is the best way to pass objects to “navigated to” viewmodel in MVVMCross?

ⅰ亾dé卋堺 提交于 2019-12-17 18:53:26
问题 I've a ViewModel which contains a Team which has a Players property which is a list of Player objects. Within TeamView the Team is deep loaded, so player data is already in the memory. What is the best way to pass a given selected Player class instance to a PlayerView? The problem is that MVVMCross ViewModel constructors can only contain string properties in current version. I've the following ideas: Pass the Id of the selected Player and assign the Team.Players property as a ViewModel to the

How to properly write a custom UncaughtExceptionHandler in Xamarin.Android

。_饼干妹妹 提交于 2019-12-17 17:09:10
问题 All I want to achieve is to catch exceptions on my app so that I can send them to a server. I figured out that I can do this by writing my custom UncaughtExceptionHandler base on native Android code in Java answered here in StackOverflow. This is my CustomExceptionHandler class: public class CustomExceptionHandler : Thread.IUncaughtExceptionHandler { public IntPtr Handle { get; private set; } public CustomExceptionHandler(Thread.IUncaughtExceptionHandler exceptionHandler) { Handle =

How to detect application exit on android?

流过昼夜 提交于 2019-12-17 16:26:27
问题 How to execute some code on application exit? I want to delete temp data on application exit. By application exit i mean that app is not running minimized in background and its totally gone. I tried to make service that runs in separate process, the service is checking if app process is not running it should delete temp folder. With this approach temp folder is not always deleted because process is still running with the lowest priority. I can't do this in OnDestroy(). Service code: [Service

MvxListView create binding for template layout from code

放肆的年华 提交于 2019-12-17 16:08:22
问题 Lets say I have a simple Layout with a MvxListView: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res/LiivControl.Client.Droid" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Mvx.MvxListView android:layout_width="fill_parent" android:layout_height="wrap_content" local:MvxBind="ItemsSource AutoListItems; ItemClick

“java.exe” exited with code 2 Xamarin.Android project

无人久伴 提交于 2019-12-17 15:49:06
问题 so I have my Xamarin.Android project which contains several libraries. When I try to build I receive an error which says "java.exe" exited with code 2. After some hours of google research I found out that I could enable Multidex. According to the blog entry of Jon Doublas I did the steps mentioned. http://www.jon-douglas.com/2016/09/05/xamarin-android-multidex/ According to the blog entry Android API Level > 21 handles Multidex itself. Well my experience is that it does not. I am building on

Android Intent Chooser to only show E-mail option

≡放荡痞女 提交于 2019-12-17 15:36:24
问题 My app integrates e-mail where the user can submit a bug report, feedback, etc. from the app directly. I'm using the application/octet-stream as the SetType for the Intent. When you go to submit the e-mail you get the content chooser and it shows various items from Evernote, Facebook, E-mail, etc. How can I get this chooser to only show E-mail so as not to confuse the user with all these other items that fit the content chooser type? Thank you. 回答1: I am presuming that you are using the