xamarin.android

MvxRecyclerView with button in each row

拜拜、爱过 提交于 2019-12-25 00:18:40
问题 I am making an Android application with Xamarin.Android and MvvmCross. I have a MvxRecyclerView : <MvvmCross.Droid.Support.V7.RecyclerView.MvxRecyclerView android:layout_width="match_parent" android:layout_height="match_parent" android:background="@null" local:MvxItemTemplate="@layout/auto_complete_search_item" local:MvxBind="ItemsSource SearchAutoCompleteItems; ItemClick SearchAutoCompleteItemClick" /> And my auto_complete_search_item.xml : <?xml version="1.0" encoding="utf-8"?>

Cannot open a Xamarin.Forms “Page” from Xamarin.Android

↘锁芯ラ 提交于 2019-12-25 00:13:26
问题 Context: Our team is trying to use Xamarin.Forms (XF) Embedding to slowly convert our project from using Xamarin.Native to XF, for easier maintenance & implementation of features in the future. The Problem: As you can see in the function parameters on the lines referenced by the links, Xamarin allows you to convert any type of XF Page to a native ViewController in iOS, but it only allows converting a XF ContentPage to a native Fragment in Android. Importance: This difference plays a major

Analyze or collect Xamarin stack traces for ANR in google play console

元气小坏坏 提交于 2019-12-25 00:08:58
问题 We are getting some stack traces for "background" (on broadcast reciever) ANR's in google play console. But there are all looking something like this: "main" prio=5 tid=1 Native | group="main" sCount=1 dsCount=0 obj=0x7523b718 self=0xec085400 | sysTid=13422 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xef6bb534 | state=S schedstat=( 0 0 0 ) utm=74 stm=24 core=7 HZ=100 | stack=0xff1ec000-0xff1ee000 stackSize=8MB | held mutexes= #00 pc 0000000000017520 /system/lib/libc.so (syscall+28) #01

MvvmCross Android binding Enabled not work with Click

两盒软妹~` 提交于 2019-12-24 22:25:23
问题 I have a TextView bound with Enabled, Clickable and Click. When the activity is loaded, Enabled & Clickable were bound to false value but the TextView cannot be disabled & still be clickable. After changed the bound value to true & then false, the TextView is disabled. I found that the issue was related to binding the Click event. Once Click is bound, the mentioned issue occurs. Without binding the Click event, it works as expected. In the following sample code, the first 2 TextViews are ok.

Xamarin.Android DhcpInfo.Netmask returns 0

余生长醉 提交于 2019-12-24 21:24:00
问题 I'm trying to get my network address with DhcpInfo.Netmask but the net mask I get is 0, even though my device is connected to a wifi network. This is the code I'm using: namespace checks { [Activity(Label = "checks", MainLauncher = true, Icon = "@drawable/icon")] public class MainActivity : Activity { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView (Resource.Layout.Main); Button dataButton = FindViewById<Button>(Resource.Id.connectionDataButton);

Xamarin.Forms.Platform.Android.Platform+DefaultRenderer from native handle

冷暖自知 提交于 2019-12-24 20:10:11
问题 I am developing app on android using xamarin forms. Since few days, I am getting below issue. CurrentDomainOnUnhandledException ---> System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.Platform+DefaultRenderer from native handle 0xbeb0861c (key_handle 0xb3a225b). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.Platform+DefaultRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java

Xamarin Forms Geocode Android

馋奶兔 提交于 2019-12-24 19:23:07
问题 I Have two pieces of code, one to get adresses from a position & one to get position from adress. GetAddressesForPosition var geoCoder = new Geocoder(); Task.Run(async () => { var possibleAddresses = await geoCoder.GetAddressesForPositionAsync(position); Device.BeginInvokeOnMainThread(() => { var firstAdress = possibleAddresses.FirstOrDefault(); GeolocationAdressEntry.Text = firstAdress; //GeolocationAdressEntry.Text = $@"{firstAdresse.} {firstAdresse.PostalCode} {firstAdresse.Locality}"; });

How to delete row in ReCyclerListView On Click of Menu button in Contextual Action Bar In Xamarin Android?

泪湿孤枕 提交于 2019-12-24 19:19:29
问题 I have followed below link on how to implement Contextual action bar with Recycler View https://stackoverflow.com/a/45911314/6117355...Can any one tell me how to perform some action like (edit/delete) operations on rows of Recyclerview on based of button actions of Contextual action bar in xamarin Android? 回答1: Can any one tell me how to perform some action like (edit/delete) operations on rows of Recyclerview on based of button actions of Contextual action bar in xamarin Android? Firstly,

Returning a true/false value from a Func<object, bool> implementation with an Android AlertDialog, without blocking the UI

微笑、不失礼 提交于 2019-12-24 19:18:34
问题 I have to use a function in my Xamarin project, which has a DoOperation(Func<object, bool> ConfirmOperation) overload. The object has a property, called string TextToCheck. The function should check this property, and if it meets a certain criteria, it needs to ask the user whether he wants to continue with the operation, or not. The implementation of the Func<object, bool> function that the DoOperation(Func<object, bool> ConfirmOperation) invokes in itself would go something like this in

Rg.Plugins.Popup is not closing when background is clicked in Xamarin.Forms

守給你的承諾、 提交于 2019-12-24 18:26:24
问题 I have used rg.plugins.popup in my application. I have updated the xamarin forms (version="2.5.0.121934"). Now the outer background is clicked it is not closed. I used to close the popup many ways, but not closed, I tried the below code: this.CloseWhenBackgroundIsClicked = false; protected override bool OnBackgroundClicked() { Navigation.PopPopupAsync(); return false; } OnBackgroundClicked is not calling. How to fix this issue? 回答1: I don't understand if you know that the correct code is: