We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfPopupLayout - Java.Lang.IllegalArgumentException

Thread ID:





148457 Oct 21,2019 08:12 AM UTC Nov 19,2019 09:05 AM UTC Xamarin.Forms 5
Tags: SfPopup
Tomas Turek
Asked On October 21, 2019 08:12 AM UTC

I have a problem with reopening SfPopupLayout on Android (iOS is OK). After quick open and close popup several times in a row I get error: "Java.Lang.IllegalArgumentException: 'width and height must be > 0" 
Some devices work fine but some are witch error and application fall after reopening popup. (For example: Huawei P10 (android 9) - OK, Xiaomi, Redmi 4 (android 6) - ERROR, simulator (as attached picture)- ERROR). Please how to solve this problem? (I Attached notes with my codes).
Next question:
I can´t find a way how (and where) to write "try" "catch" in this case.

Thank you

Attachment: SfPopupLayoutCode_a215d768.zip

Balasubramani Sundaram [Syncfusion]
Replied On October 22, 2019 03:03 PM UTC

Hi Tomas,  
Thank you for contacting Syncfusion support.   
Based on your provided code snippet we have analyzed the issue “Java.Lang.IllegalArgumentException”. Due to the unavailability of the specified device as you have mentioned so we have checked the issue with similar device Huawei 9N and Redmi Note 4 in that we have performed a continues open and close the popup as much but we could not able to replicate the issue in our end. Meanwhile, we also configure the simulator as you have mentioned in the image to check the issue. 
Please refer the sample and video, 
Note: Issue has been checked with Xamarin. Forms version and Syncfusion NuGet version 
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us with the more details, so that it will be helpful for us to check on it and provide you the solution at the earliest.    
Balasubramani Sundaram   

Tomas Turek
Replied On October 31, 2019 10:51 AM UTC

Thank you for your reply and sample.
Your provided code seems to be the same as mine.

Unfortunately, after a few more hours of investigation, I think that I found a place where the error occurs. In my project (on login page I call method to switch color theme mode of syncfusion component). I use your code from your documentation. If I switch theme on start app  -> then after quick open and close popup several times in a row I get error: "Java.Lang.IllegalArgumentException: 'width and height must be > 0" . I got this message from all opening popup (DataGrid row click, after Button click, ListView item click,....). 

I updated your sample (I place call method "ChooseThemeMode" into App).

How to solve it?

Attachment: Popup_Error_eb702099.zip

Karthikraja Kalaimani [Syncfusion]
Replied On November 1, 2019 02:35 PM UTC

Hi Tomas,

Thanks for the update. 
We have checked the attached sample and we can able to reproduce the reported issue “java.Lang.IllegalArgumentException : ‘Width and Height’ must be > 0 Exception occurs while opening the popup”  from our side. Currently, we are validating the issue in both sample and source level. We will update you the details on 4th November 2019.We appreciate your patience until then. 
Karthik Raja

Karthikraja Kalaimani [Syncfusion]
Replied On November 4, 2019 12:52 PM UTC

Hi Tomas,

Thanks for your patience.

We have checked the reported issue “java.Lang.IllegalArgumentException : ‘Width and Height’ must be > 0 Exception occurs while opening the popup” and we have logged the bug report the same. We will fix this issue and include the issue fix in our upcoming weekly nuget which is scheduled on 19th November 2019.  We appreciate your patience until then. 
You can also track the status of the report in below feedback link 

Karthik Raja 

Karthikraja Kalaimani [Syncfusion]
Replied On November 19, 2019 09:05 AM UTC

Hi Tomas, 
Thanks for your patience.      
We have fixed this issue “Java.Lang.IllegalArgumentException occurs while opening the popup when ShowCloseButton is false” and included in our Weekly NuGet, which is available for download now.   
Please let us know if you require further other assistance from us.   
Karthik Raja 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon