I suspended the app as per this post in StackOverflow.
When I click on Resume menu item, the OnResume is not called. But if I go to the app list and start the app, after suspend, the OnResume() is called.
What is the difference?
I suspended the app as per this post in StackOverflow.
When I click on Resume menu item, the OnResume is not called. But if I go to the app list and start the app, after suspend, the OnResume() is called.
What is the difference?
one page of my application it contains carousal view it works fine , but sometime when i move between pages i got this error "unfortunately my application has stopped ".
the problem is : when i use emulator this error does not appear, but when i use my real device this happen sometimes.
another note when i debug the application on the real device and when this error appear , application stopped but didn't go back to the code.
any suggestion please ?
In UWP app, I need to refresh a list when the app is resumed. Since the OnResume() is in App.cs, how can I refresh a list in, say, MainPage? Will OnResume() fire any events in the page that is being resumed?
I am trying to write first UITest for my Forms App. When I try to run the iOS test, it throws the following exception. Is this a known issue?
I am using Xamarin studio 6.1.3 (build 19).
The version of Xamarin.UITest package 2.0.5.
The test is very basic
[Test]
public void AppLaunches ()
{
try {
app.WaitForElement ("Waiting for fake element", "Timeout", new TimeSpan (0, 0, 20));
} catch (TimeoutException ex) {
int i = 5;
}
app.Screenshot ("Welcome screen.");
app.Tap ("CheckinButton");
app.Screenshot ("New checkin screen.");
}
Here are the exception details:
SetUp : System.Xml.XmlException : '', hexadecimal value 0x01, is an invalid character. Line 11, position 11.
Stack trace:
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x0020a] in <e747267e258a4a668973c7ca7e9014a8>:0
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient, Xamarin.UITest.Shared.Http.HttpClient xtcServicesClient, System.Boolean testCloudUseDeviceAgent) [0x0007a] in <e747267e258a4a668973c7ca7e9014a8>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00302] in <e747267e258a4a668973c7ca7e9014a8>:0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <e747267e258a4a668973c7ca7e9014a8>:0
at UITest.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x0001f] in /Users/Prashant/projects/instacheckin-mobile/instacheckin-mobile-2/UITest/AppInitializer.cs:38
at UITest.Tests.BeforeEachTest () [0x00008] in /Users/Prashant/projects/instacheckin-mobile/instacheckin-mobile-2/UITest/Tests.cs:26
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
Hi everybody,
i am developing a radial menu with skia sharp on xamarin forms
here is the function that draws the control
SKCanvasView ElementBuilder()
{
var element = new SKCanvasView();
element.PaintSurface += (sender, e) =>
{
diameter = (float)(Width / 1.5);
var canvas = e.Surface.Canvas;
canvas.Clear(SKColors.Transparent);
canvas.Translate((float)(Width), (float)(Height));
var angles = new float[5] { 234, 306, 18, 90, 162 };
using (var path = new SKPath())
{
foreach (var item in angles)
{
path.ArcTo(new SKRect(-diameter, -diameter, diameter, diameter), item, 72, true);
}
canvas.DrawPath(path, elementPaint);
}
using (var path = new SKPath())
{
foreach (var item in angles)
{
path.LineTo(DegreesToXY(item, (-diameter - (strokeWidth / 2))));
path.MoveTo(0, 0);
path.LineTo(DegreesToXY(item + 72, (-diameter - (strokeWidth / 2))));
path.MoveTo(0, 0);
}
canvas.DrawPath(path, backgroundPaint);
}
};
return element;
}
Works perfectly on every iOS device I have tested and on my personal device which i used during development (Sony xperia z3 compact)
On every other Android device, with any version of the os the sizing of the view is different
I upload here 3 screenshot (IPhone 7 simulator, Xperia z3 compact, Nexus 5)
Every Android device renders the same (the third image), except the sony
How to give the correct size to the view?
Thank in advance
Hi
Do you know how is possible enable the support from GZIP in App Service Mobile ?
I'm using
HttpClientHandler mHttpClientHandler = new HttpClientHandler();
mHttpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
client = new MobileServiceClient(applicationURL, mHttpClientHandler );
All works but.... when I sniff related traffic .... no gzip.
I'm using Microsoft.Azure.Mobile.Client vers. 3.1.0
Tnx
Maybe I'm not searching for the right thing here, but by the life of me I cannot find a good sample of how to layer one control over the other, in XAML.
For instance I have a map control and I want to add a box with some data and buttons on top of it, much like how RunKeeper did;
I've did some experimenting with the Relative- and AbsoluteLayout, but I can't quite figure out how to do it.
Is there anyone who could give me a little push in the right direction with this?
Here is what I have so far;
<StackLayout Orientation="Vertical">
<maps:Map x:Name="MapControl" HasZoomEnabled="True" IsShowingUser="True" MapType="Street"></maps:Map>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Text="{Binding ButtonCaption}" Command="{Binding StartStopTripCommand}" />
<Button Grid.Column="1" Text="Verstuur" Command="{Binding SendTripCommand}" />
<Label Grid.Column="2" Text="{Binding CurrentSpeedDescription}" />
</Grid>
</StackLayout>
And the grid would be floating at the top, instead of now being stacked below.
Hello guys,
I am developing an application in Xamarin Forms, I am trying to set in the Android status bar and transparent bar action with an image that will overlap. As in the image below. Any idea? thanks
The entry background color is not working on Android 4.2.2 using GT-I9295 (Galaxy S4).
Steps to reproduce :
Pull Latest https://github.com/xamarin/xamarin-forms-samples
Open EntryDemoPage
Change Entry Background color to Xamarin.Forms.Color.White
Run on device (background color is not white)
Works correctly on 4.4.3 Nexus 5. Looks like on 4.2.2 it is setting the Border color instead of the Background color
FormsPresenter
instead of TabbedPagePresenter
. This is an internal change only that will only affect users explicitly targeting TabbedPagePresenter
in the UWP project.Nuget package here.
Nuspec change to Android dependencies. When targeting framework 7.0 or greater you many use Android support libraries with API 23 or greater, and Maps with API 29 or greater.
No other changes.
Nuget package here.
Add authenticode signing.
No other changes.
Nuget package here.
Nuget package here.
Nuget package here.
Nuget package here.
43993 - "iOS: ListView size does not return to normal after keyboard disappears" (PR)
39768 - "PanGestureRecognizer sometimes won't fire completed event when dragging very slowly" (PR)
Nuget package here.
The following Xaml is valid, and works as expected:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ios="clr-namespace:UIKit;assembly=Xamarin.iOS;targetPlatform=iOS"
xmlns:androidWidget="clr-namespace:Android.Widget;assembly=Mono.Android;targetPlatform=Android"
xmlns:formsandroid="clr-namespace:Xamarin.Forms;assembly=Xamarin.Forms.Platform.Android;targetPlatform=Android"
xmlns:win="clr-namespace:Windows.UI.Xaml.Controls;assembly=Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime;targetPlatform=Windows"
x:Class="Xamarin.Forms.Controls.XamlNativeViews">
<ContentPage.Content>
<ios:UILabel Text="{Binding NativeText}" View.HorizontalOptions="Start"/>
<androidWidget:TextView Text="{Binding NativeText}" x:Arguments="{x:Static formsandroid:Forms.Context}" />
<win:TextBlock Text="Foo"/>
</ContentPage.Content>
</ContentPage>
UpdateSourceEventName
parameter to the binding expression.Introducing Platform Specifics! Features or behaviors that apply to one platform only can now be implemented without requiring custom renderers. These new features/behaviors can then be accessed easily via a fluent code API or XAML.
Vendors can easily add their own Platform Specifics by attaching Effects to them (see 63a924d and 1f9482e for complete example).
This feature implements the framework that enables the new API and also includes several examples of platform specific features, which can be previewed using the Platform Specifics gallery page:
Only internal. There were no public artifacts/nuget packages for pre1.
i.e.
`
<Button Clicked="OnLoginClicked"
Image="Images/Login/loginWithFacebookButton.png"
IsEnabled="{!(Binding IsLoggingIn)}" <<<<<<< this is the bit that I don't know how to do.
`
Do I just have to add a waiting variable too? (hope not).
Clicked answer on the wrong one!! - this is my preferred answer:
<Button Clicked="OnLoginClicked"
Image="Images/Login/loginWithFacebookButton.png"
IsEnabled="{!(Binding IsLoggingIn.Equals(false))}"
Hey all,
Anybody face this before? When I remove any item but the last one from my Collection (listview) and try to add an item right after that, it fails with System.NullReferenceException. Here's where the debugger points to and the stacktrace. Thx!
Where debugger points to this in code:
**return new ViewCell**
{
View = new StackLayout
{
Orientation = StackOrientation.Horizontal,
Spacing = 10,
Padding = 6,
Children =
{
addressIcon,
listLabel
}
}
};
Stacktrace:
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
07-05 21:28:06.643 D/Mono ( 4003): DllImport attempting to load: '/system/lib/liblog.so'.
07-05 21:28:06.643 D/Mono ( 4003): DllImport loaded library '/system/lib/liblog.so'.
07-05 21:28:06.643 D/Mono ( 4003): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
07-05 21:28:06.653 D/Mono ( 4003): Searching for '__android_log_print'.
07-05 21:28:06.653 D/Mono ( 4003): Probing '__android_log_print'.
07-05 21:28:06.653 D/Mono ( 4003): Found as '__android_log_print'.
07-05 21:28:06.663 I/MonoDroid( 4003): UNHANDLED EXCEPTION:
07-05 21:28:06.683 I/MonoDroid( 4003): System.NullReferenceException: Object reference not set to an instance of an object.
07-05 21:28:06.683 I/MonoDroid( 4003): at Xamarin.Forms.Platform.Android.VisualElementPackager.RemoveChild (Xamarin.Forms.VisualElement view) [0x00014] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:139
07-05 21:28:06.683 I/MonoDroid( 4003): at Xamarin.Forms.Platform.Android.VisualElementPackager.OnChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x0000f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:125
07-05 21:28:06.693 I/MonoDroid( 4003): at (wrapper delegate-invoke) System.EventHandler1[T].OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Layout.cs:391[Xamarin.Forms.ElementEventArgs]:invoke_void_object_TEventArgs (object,Xamarin.Forms.ElementEventArgs) 07-05 21:28:06.693 I/MonoDroid( 4003): at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x0000f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Element.cs:356 07-05 21:28:06.693 I/MonoDroid( 4003): at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\VisualElement.cs:577 07-05 21:28:06.693 I/MonoDroid( 4003): at Xamarin.Forms.Layout
07-05 21:28:06.693 I/MonoDroid( 4003): at Xamarin.Forms.Layout.OnInternalRemoved (Xamarin.Forms.View view) [0x00012] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Layout.cs:412
07-05 21:28:06.693 I/MonoDroid( 4003): at Xamarin.Forms.Layout.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0002f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Layout.cs:376
07-05 21:28:06.693 I/MonoDroid( 4003): at (wrapper delegate-invoke) :invoke_void_object_NotifyCollectionChangedEventArgs (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)
07-05 21:28:06.693 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (NotifyCollectionChangedAction action, System.Object item, Int32 index) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:3511[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 07-05 21:28:06.693 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection
07-05 21:28:06.693 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection1[T].Remove (System.Collections.ObjectModel.T item) [0x0002d] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/collections/objectmodel/collection.cs:1131[T].RemoveItem (Int32 index) [0x0002b] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:205 07-05 21:28:06.693 I/MonoDroid( 4003): at System.Collections.ObjectModel.Collection
07-05 21:28:06.693 I/MonoDroid( 4003): at Xamarin.Forms.Layout.OnInternalAdded (Xamarin.Forms.View view) [0x0000b] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Layout.cs:399
07-05 21:28:06.693 I/MonoDroid( 4003): at Xamarin.Forms.Layout.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00089] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Layout.cs:391
07-05 21:28:06.693 I/MonoDroid( 4003): at (wrapper delegate-invoke) :invoke_void_object_NotifyCollectionChangedEventArgs (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)
07-05 21:28:06.693 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (NotifyCollectionChangedAction action, System.Object item, Int32 index) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:3511[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 07-05 21:28:06.693 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection
07-05 21:28:06.693 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection1[T].Add (System.Collections.ObjectModel.T item) [0x00023] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/collections/objectmodel/collection.cs:671[T].InsertItem (Int32 index, System.Collections.ObjectModel.T item) [0x00024] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:219 07-05 21:28:06.693 I/MonoDroid( 4003): at System.Collections.ObjectModel.Collection
07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.ObservableWrapper2[TView,TItem].CreateContent (Int32 index, System.Object item, Boolean insert) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\TemplatedItemsList.cs:5082[TTrack,TRestrict].Add (Xamarin.Forms.TRestrict item) [0x0004b] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ObservableWrapper.cs:35 07-05 21:28:06.703 I/MonoDroid( 4003): at myPT.AddressListView+<>c__DisplayClass4_0.<.ctor>b__0 () [0x0004c] in C:\Users\Ryan J\Documents\Visual Studio 2015\Projects\myPT\myPT\myPT\Views\AddressListView.cs:41 07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.ElementTemplate.CreateContent () [0x00026] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ElementTemplate.cs:78 07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.DataTemplateExtensions.CreateContent (Xamarin.Forms.DataTemplate self, System.Object item, Xamarin.Forms.BindableObject container) [0x00014] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\DataTemplateExtensions.cs:12 07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.TemplatedItemsList
07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.TemplatedItemsList2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e, Boolean fixWindows) [0x0017e] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\TemplatedItemsList.cs:9622[TView,TItem].ConvertContent (Int32 startingIndex, IList items, Boolean forceCreate, Boolean setIndex) [0x00014] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\TemplatedItemsList.cs:632 07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.TemplatedItemsList
07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.TemplatedItemsList1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:2882[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\TemplatedItemsList.cs:914 07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ListProxy.cs:229 07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.ListProxy+<>c__DisplayClass32_0.<OnCollectionChanged>b__0 () [0x00018] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ListProxy.cs:202 07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000a0] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ListProxy.cs:221 07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.ListProxy+WeakNotifyProxy.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00031] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\ListProxy.cs:385 07-05 21:28:06.703 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection
07-05 21:28:06.703 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection1[T].InsertItem (Int32 index, System.Collections.ObjectModel.T item) [0x00024] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:2191[T].OnCollectionChanged (NotifyCollectionChangedAction action, System.Object item, Int32 index) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:351 07-05 21:28:06.703 I/MonoDroid( 4003): at System.Collections.ObjectModel.ObservableCollection
07-05 21:28:06.703 I/MonoDroid( 4003): at System.Collections.ObjectModel.Collection`1[T].Add (System.Collections.ObjectModel.T item) [0x00023] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/collections/objectmodel/collection.cs:67
07-05 21:28:06.703 I/MonoDroid( 4003): at myPT.Pages.AddressAdd.AddBtn_Clicked (System.Object sender, System.EventArgs e) [0x000d6] in C:\Users\Ryan J\Documents\Visual Studio 2015\Projects\myPT\myPT\myPT\Pages\AddressAdd.cs:97
07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.Button.Xamarin.Forms.IButtonController.SendClicked () [0x00020] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Button.cs:122
07-05 21:28:06.703 I/MonoDroid( 4003): at Xamarin.Forms.Platform.Android.ButtonRenderer+ButtonClickListener.OnClick (Android.Views.View v) [0x0000f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\ButtonRenderer.cs:269
07-05 21:28:06.703 I/MonoDroid( 4003): at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (IntPtr jnienv, IntPtr native__this, IntPtr native_v) [0x00011] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:1806
07-05 21:28:06.703 I/MonoDroid( 4003): at (wrapper dynamic-method) System.Object:37af5531-783b-47a6-b78a-63d4a592ed71 (intptr,intptr,intptr)
07-05 21:28:06.773 D/Mono ( 4003): DllImport searching in: '__Internal' ('(null)').
07-05 21:28:06.773 D/Mono ( 4003): Searching for 'java_interop_jnienv_throw'.
07-05 21:28:06.773 D/Mono ( 4003): Probing 'java_interop_jnienv_throw'.
07-05 21:28:06.783 D/Mono ( 4003): Found as 'java_interop_jnienv_throw'.
An unhandled exception occured.07-05 21:28:08.033 E/mono ( 4003):
07-05 21:28:08.033 E/mono ( 4003): Unhandled Exception:
07-05 21:28:08.033 E/mono ( 4003): System.NullReferenceException: Object reference not set to an instance of an object.
07-05 21:28:08.033 E/mono ( 4003): at (wrapper dynamic-method) System.Object:37af5531-783b-47a6-b78a-63d4a592ed71 (intptr,intptr,intptr)
07-05 21:28:08.033 E/mono ( 4003): at (wrapper native-to-managed) System.Object:37af5531-783b-47a6-b78a-63d4a592ed71 (intptr,intptr,intptr)
In mgmain JNI_OnLoad
07-05 21:28:08.043 E/mono-rt ( 4003): [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
07-05 21:28:08.043 E/mono-rt ( 4003): at (wrapper dynamic-method) System.Object:37af5531-783b-47a6-b78a-63d4a592ed71 (intptr,intptr,intptr)
07-05 21:28:08.043 E/mono-rt ( 4003): at (wrapper native-to-managed) System.Object:37af5531-783b-47a6-b78a-63d4a592ed71 (intptr,intptr,intptr)
I've noticed that my Xamarin Forms projects keep growing in size over time. It used to be just over a 1GB, now its almost at 5GB.
The bulk of the space seems to be in theios/obj/debug
, with files that I don't have control over. Is this normal?
Unfortunately my webservice methods now throw this exception only using proxy in android
System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: ConnectFailure (Network is unreachable) ---> System.Net.Sockets.SocketException: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000cb] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/System/System.Net.Sockets/Socket.cs:1288
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x0019b] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/System/System.Net/WebConnection.cs:195
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream (System.IAsyncResult asyncResult) [0x00043] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:900
at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x00014] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () [0x002a7] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:370
--- End of inner exception stack trace ---
at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () [0x0047a] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:383
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at System.Net.Http.HttpClient+<SendAsyncWorker>c__async0.MoveNext () [0x000a9] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:276
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/4009/f3074d2c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at ClassLibrary.Dao.Conexao+<Redirecionar>d__1.MoveNext
Does anybody have a clue what is going on here?
Hi
I am building a cross-platform windows/android app.
I am using a master detail page.
While on Windows the hamburger menu is displayed correctly, on Android a back button is shown instead. I have tried setting NavigationPage.SetHasBackButton, but it is still shown. Does anyone have an idea how I can get rid of the back button and keep the hamburger menu?
Thanks
hi, I have tried to add a styles.xml to the xamarin.forms.android project in resources/values to change the selected color of a listview but it doesn't works, any idea about this?
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<style name="MyTheme" parent="android:style/Theme.Holo.Light">
<item name="android:colorPressedHighlight">@color/ListViewSelected</item>
<item name="android:colorLongPressedHighlight">@color/ListViewHighlighted</item>
<item name="android:colorFocusedHighlight">@color/ListViewSelected</item>
<item name="android:colorActivatedHighlight">@color/ListViewSelected</item>
<item name="android:activatedBackgroundIndicator">@color/ListViewSelected</item>
</style>
<color name="ListViewSelected">#96BCE3</color>
<color name="ListViewHighlighted">#E39696</color>
</resources>
How does this even happen?
So I've spent hours upon hours trying to get this to work, looking at 2 separate examples of how to bind an ObservableCollection to a listview. I can bind to the viewmodel just fine as on hour 3 I created a message dialog to make sure that the list was completely empty by getting some information out of this list. Here is what I've got so far:
XAML
<ListView ItemsSource="{Binding icitems}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout x:Name="ViewCellStackLayout"
Orientation="Horizontal">
<Label x:Name="NameLabel"
Text="{Binding itemname}"/>
<Label x:Name="ItemNumLabel"
Text="{Binding itemnum}"/>
<Label x:Name="ClassLabel"
Text="{Binding classIcitem}"/>
<Label x:Name="LookupLabel"
Text="{Binding lookup1}"/>
<Label x:Name="UPCNumLabel"
Text="{Binding upcnum}"/>
<Label x:Name="BarcodeLabel"
Text="{Binding barcode}"/>
<Label x:Name="BuyQTYLabel"
Text="{Binding buyqty_mult}"/>
<Label x:Name="ConvLabel"
Text="{Binding conv}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
THE ICITEM CLASS
public IcItem() { }
[SQLite.PrimaryKey, SQLite.AutoIncrement]
public int ID { get; set; }
public string itemnum { get; set; }
public string itemname { get; set; }
public string classIcitem { get; set; }
public string lookup1 { get; set; }
public string upcnum { get; set; }
public string barcode { get; set; }
public int buyqty_mult { get; set; }
public int conv { get; set; }
public DateTime syncDate { get; set; }
VIEWMODEL
private ObservableCollection<IcItem> _icItems;
public ObservableCollection<IcItem> icitems
{
get { return _icItems; }
set { Set(() => icitems, ref _icItems, value); }
}
While being so close to finishing my project, I have one issue... While trying to bind results to my labels, I keep getting these errors:
Binding: 'Publisher' property not found on 'Nintendo', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Publisher' property not found on 'Nintendo', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Platform' property not found on 'Wii U', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Platform' property not found on 'Wii U', target property: 'Xamarin.Forms.Label.Text'
I've looked at multiple sites for help but I can't seem to figure out why it's not working properly. The results (Nintendo, Wii U) are correct and are showing in these errors but nothing is being binded to my labels. So my question is... What exactly am I doing wrong?
Here's my xaml:
<?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="Finale.DetailsPage"
xmlns:local="clr-namespace:Finale;assembly=Finale"
Title="{Binding Name}"
BackgroundColor="White">
<ScrollView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<StackLayout Padding="5, 25">
<Label x:Name="lblTitle"
Text="{Binding Name}"
Font="Bold,Large"
HorizontalOptions="Center"/>
<Image x:Name="imgCover"
Source="{Binding Image}"
WidthRequest="200"
HeightRequest="200"/>
<StackLayout Padding="50, 10">
<!-- Developer -->
<StackLayout Orientation="Horizontal">
<Label Text="Developer(s):"
HorizontalOptions="FillAndExpand" />
<Label x:Name="lblDeveloper"
Text="{Binding Developer}"
Font="Bold,Medium" />
</StackLayout>
<!-- Publisher -->
<StackLayout Orientation="Horizontal">
<Label Text="Publisher(s):"
HorizontalOptions="FillAndExpand" />
<Label x:Name="lblPublisher"
Text="{Binding Publisher}"
Font="Bold,Medium" />
</StackLayout>
<!-- Platform -->
<StackLayout Orientation="Horizontal">
<Label Text="Platform(s):"
HorizontalOptions="FillAndExpand" />
<Label x:Name="lblPlatform"
Text="{Binding Platform}"
Font="Bold,Medium" />
</StackLayout>
<!-- Release Date -->
<StackLayout Orientation="Horizontal">
<Label Text="Release Date:"
HorizontalOptions="FillAndExpand" />
<Label x:Name="lblReleaseDate"
Text="{Binding ReleaseDate}"
Font="Bold,Medium" />
</StackLayout>
<!-- Summary -->
<StackLayout Orientation="Horizontal">
<Label x:Name="lblSummary"
Text="{Binding Summary}"
Font="Bold,Medium" />
</StackLayout>
</StackLayout>
</StackLayout>
</ScrollView>
</ContentPage>
And here's my .cs:
namespace Finale
{
public partial class DetailsPage : ContentPage
{
public ObservableCollection<Details> Details { get; set; }
DatabaseManager objDB;
List<ToDo> DID;
int prevGameID;
public DetailsPage()
{
InitializeComponent();
GetDetails ();
this.BindingContext = new Details();
}
public async Task GetDetails()
{
objDB = new DatabaseManager ();
DID = objDB.ViewNextG ();
prevGameID = DID [0].gameid;
try {
Details = new ObservableCollection<Details>();
var query = ParseObject.GetQuery("tblGameDetails")
.WhereEqualTo("gameid", prevGameID);
IEnumerable<ParseObject> games = await query.FindAsync ();
foreach (ParseObject game in games) {
int detailsid = game.Get<int>("id");
string gametitle = game.Get<String>("gametitle");
string developer = game.Get<String>("developer");
string publisher = game.Get<String>("publisher");
string platform = game.Get<String>("platform");
DateTime releasedate = game.Get<DateTime>("releasedate");
string image = game.Get<String>("image");
string summary = game.Get<String>("summary");
Details.Add(new Finale.Details
{
ID = detailsid,
Name = gametitle,
Developer = developer,
Publisher = publisher,
Platform = platform,
ReleaseDate = Convert.ToString(releasedate),
Image = image,
Summary = summary,
});
Console.WriteLine(detailsid + " " + gametitle);
}
lblTitle.BindingContext = Details[0].Name;
imgCover.BindingContext = Details[0].Image;
lblDeveloper.BindingContext = Details[0].Developer;
lblPublisher.BindingContext = Details[0].Publisher;
lblPlatform.BindingContext = Details[0].Platform;
lblReleaseDate.BindingContext = Convert.ToString(Details[0].ReleaseDate);
lblSummary.BindingContext = Details[0].Summary;
} catch (ParseException e) {
Console.WriteLine ("Error: ", e.Message);
}
}
}
}
I am trying to add the correct version of System.Net.Http to my Xamarin project. I can't seem to get it through Nuget. I have tried adding it through the add references dialog, clicking Assemblies --> Framework and it says all framework DLLs are already referenced. If I scan my hard drive for System.Net.Http.dll hundreds of entries come up. What is the correct way to add this DLL reference to a Xamarin project? In the future, I believe the base Xamarin projects should have it already since this is about the only way I know of to map WebAPI calls etc.
Using Xamarin.Forms.Maps 2.3.3.193. The call to GetAddressesForPositionAsync always returns null for Android. It works fine for iOS and UWP. I've only tried on the Visual Studio emulator, but the other platforms work with the emulators/simulators. I have set a location in the emulator. Anything I'm missing?