Xamarin forms Picker control issue (android, appcompat) - xamarin.android

Steps to reproduce issue:
Create blank XF app, apply app compat and material design following this guide
Add Picker control to main page with some items (doesnt matter what)
Start app (tested on device 5.0 and emulator 4.4), try to fast double tap on pickers EditText field - it causes opening of two AlertDialog (or whatever) with pickers elements to select. When you choose some element or touches cancel button top dialog dismisses and shows underlying (we tapped twice and if we was fast enough - got two dialogs). Selecting any item or cancel button on second dialog we getting NullReferenceException (sender - AlertDialog, "this" Xamarin.Forms.Platform.Android.AppCompat.PickerRenderer), stack trace here:
at
Xamarin.Forms.Platform.Android.AppCompat.PickerRenderer.b__9_2
(System.Object sender, System.EventArgs args) [0x00000] in
C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\PickerRenderer.cs:110
at
Android.Content.IDialogInterfaceOnDismissListenerImplementor.OnDismiss
(IDialogInterface dialog) [0x0000d] in
/Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Content.IDialogInterface.cs:369
at
Android.Content.IDialogInterfaceOnDismissListenerInvoker.n_OnDismiss_Landroid_content_DialogInterface_
(IntPtr jnienv, IntPtr native__this, IntPtr native_dialog) [0x00011]
in
/Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Content.IDialogInterface.cs:334
at (wrapper dynamic-method)
System.Object:b6f021d2-c6e1-4672-9b03-e892d275f304
(intptr,intptr,intptr)
Without appcompat I cant reproduce it, at least I cant get two dialogs show.
Seems like by selecting value on second dialog, we are trying to access somethig from dismissed one and getting exception. Any suggestion how to work around with that?

We just merged in a fix for this and the changes should be available beginning with the 2.3.2 prereleases.

Related

Helo finishing this simple java FX GUI

can anyone help me with this code I am kind of having difficulty with it.
it's this:
1.) Create a simple Java FX Form. It will have 3 Buttons that read “Open”, “Close”, “Exit”.
2.) Each button should display the appropriate message based on button name. For example, Open button should show a message “Open button clicked”
3.) Execute the program and capture the screen showing the results after each button is selected and message is displayed.
I tried to start it out with public static void main string args, but that's it.

react native crash when tapping navigation button too fast

I used react navigation 4.0.10 and it's little bit complicated app with nested navigator. Currently it's performing relatively well except that When I try to navigate it very fast, it will crash. The error message is
TypeError: undefined is not an object (evaluating 'navigation.state')
The structure is
-bottomTapNavigator(Home, Scan; Scan is a stackNavigator)
--HomeScreen
--ScanNavigator(stackNavigator, parent for ScanScreen and JourneyNavigator[tabNavigator])
---ScanScreen(Real page, initial screen of ScanNavigator, having buttons to navigate(HomeScreen) and navigate(JourneyNavigator))
---JourneyNavigator(TabNavigator, including ScreenTest1 and ScreenTest2; having header with back button navigate(ScanScreen) for both ScreenTest1 and ScreenTest2;)
---ScreenTest1(Real page)
---ScreenTest2(Real page, does not matter in this case)
what I do is tap ScanNavigator[ScanScreen]->ScreenTest1->ScanScreen(tap navigation button quickly here)->HomeScreen
In such case, the app will crash. If i do it with normal pace then it's fine.
Any help or direction is welcome.
EDIT
I'm 100 percent certain it's something to do with resetOnBlur setting. When it set to false, the issue gone. Help please.

iOS designer not rendering storyboard

In the Xamarin.IOS editor I get this error:
"There was a problem parsing the XML in this document"
System.NullReferenceException: Object reference not set to an instance of an object
at MonoTouch.Design.ProxiedView.set_UseSafeArea (System.Boolean value) [0x00001] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/ProxiedView.cs:944
at MonoTouch.Design.ProxiedViewController.UpdateLayoutGuides (MonoTouch.Design.Catalog utilityCatalog, MonoTouch.Design.IosDocument rootModel) [0x002ac] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/ProxiedViewController.cs:238
at MonoTouch.Design.Storyboard.UpdateLayoutGuides (MonoTouch.Design.Catalog utilityCatalog) [0x00017] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Storyboard.cs:132
at MonoTouch.Design.Client.IPhoneDesignerSession.LoadXml (System.Func`1[TResult] getDoc, System.Boolean shouldTryUpgrade, System.String fileName) [0x00310] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:466
I tried disabling things and retracing every step I made doing the storyboard, the only thing that half worked was disabling autolayout, but it destroyed my layout.
The thing is that it works perfect in the app and xcode but in the VS iOS designer it doesn't work, and I need it to add the ids of the components to use them my ViewController, in my project it's the only way to add ids.
I´m lost, if you need any extra info ask me, I pasted the important (or so I think) part of the logs, they were too long.
This is the iPad version of a storyboard that works perfectly, it was based of that storyboard (copied and pasted then edited to fit with iPad)
This is the storyboard: https://pastebin.com/QAHEBne0
The problem with your file was that somehow you have constraints related with the safeArea but it was not turn on in the file.
I fix it when I open the file in my Xcode and just turn in on(check the image)
the result is useSafeAreas="YES" added to document tag on the second row in your xml
Please, check your constraints carefully it is possible some of them to be broken or deleted.

Layout changes do not apply in tests

I have a button that allows to hide itself and another widget when pressed. When it is hidden, a new button appears on the screen which can undo (show) the previous button and widget again.
I'm pretty sure my implementation for this works because I've tested it on multiple devices without any problems, but whenever I try to write a formal test for it, something goes wrong. I'm using the following code to test my widget:
await tester.tap(find.widgetWithText(GestureDetector, "HIDE"));
expect(testContainerState.ifContainerWithOptionsIsDisplayed, false);
print(find.byType(GestureDetector));
await tester.tap(find.widgetWithText(GestureDetector, "SHOW"));
expect(testContainerState.ifContainerWithOptionsIsDisplayed, true);
The first two lines are there to tap the button and check whether ifContainerWithOptionsIsDisplayed changed. In my implementation, this is done in a setState method and should repaint to hide the widget and button and show the new button.
In the third line, I check how many GestureDetectors I can still find after what should be a repaint. The output of that print statement still shows me that all of the GestureDetectors of the widget that should now be hidden are still being found.
In the 4th line, I try to find my SHOW button that should now be visible because of the repaint. But no element is found.
Again, I'm pretty sure the code for my widgets are correct because I've tested this test case manually without any issues. Perhaps I'm missing some knowledge about Flutter tests. Could someone please fill me in?
await tester.pump();
or just
tester.pump();
should do that
See also
https://docs.flutter.io/flutter/flutter_test/WidgetTester/pump.html
https://docs.flutter.io/flutter/flutter_test/WidgetTester/pumpAndSettle.html
https://flutter.institute/flutter-and-widget-tests/

What is the meaning of the exception "Deprecated API access logged: UiApplication.popScreen()"

When I clicked on the ListField in the popup menu it gives this exception
"Deprecated API access logged: UiApplication.popScreen()"
You are using a deprecated method. Use popScreen(net.rim.device.api.ui.Screen) of the UiApplication instead of popScreen().
public final void popScreen(Screen screen)
Removes a screen from the display stack, and updates the screen.
Specified by:
popScreen in interface UiEngine
Parameters:
screen - Screen to remove.
Throws:
IllegalArgumentException - If your screen is not on the stack.

Resources