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

null pointer exception : object reference is not set an instance of an object

Hi, 

I am trying to run getting started example by Version 23.3.0 for Xamarin.Android.Support.V4 and version 2.3.2.127 for Xamarin.From I am getting an null pointer exception. 

Can you check if it's bug for SfNavigationDrawer, if not can you Please attach an example for same version.

Regards,
Mahesh

5 Replies

MA Maheshkumar replied to Maheshkumar October 29, 2016 05:20 AM

Hi, 

I am trying to run getting started example by Version 23.3.0 for Xamarin.Android.Support.V4 and version 2.3.2.127 for Xamarin.From I am getting an null pointer exception. 

Can you check if it's bug for SfNavigationDrawer, if not can you Please attach an example for same version.

Regards,
Mahesh

In addition to above If I added listview to DrawerContentView then only exception raised.

Another Query is how to change color of divider between DrawerContentView  and DrawerHeaderView.

Regards,
Mahesh


PK Pavendhan Kumar Syncfusion Team October 31, 2016 02:35 AM

Hi Magesh,

Thank you for contacting Syncfusion support.

Query 1: Adding ListView in DrawerContentView throws exception.

We were able to reproduce the reported issue at our end. And there is a query already raised in Xamarin Forum for the same. Please refer the below link.

Link: https://forums.xamarin.com/discussion/80549/android-listview-crashes-not-on-ios-or-uwp 

Query 2: How to change color of the divider between DrawerContentView and DrawerHeaderView.

Since both the DrawerContentView and DrawerHeaderView are custom views you can able to change the background color of it. By this you can differentiate one with another.

Please let us know if you have any concerns over this.

Regards,
Pavendhan K. 



MA Maheshkumar November 2, 2016 04:32 AM

Dear Pavendhan,

Please see the attached image, What I have a DrawerContentView and DrawerHeaderView with same background color. I don't want to show divider between them or have same color as background. Is it possible.

Regards,
Mahesh



Attachment: ExampleView_430f9620.zip


MA Maheshkumar replied to Maheshkumar November 2, 2016 07:18 AM

Dear Pavendhan,

Please see the attached image, What I have a DrawerContentView and DrawerHeaderView with same background color. I don't want to show divider between them or have same color as background. Is it possible.

Regards,
Mahesh



Attachment: ExampleView_430f9620.zip

Sir,

I addition to above as I can not add listview,  I tried adding stacklayout within ScrollView for DrawerContentView but DrawerContentView does not expand beyond certain limit, Please find the attached image. I tried setting Height of Drawer but it did not work either. Is their any work around for this.

Regards,
Mahesh

Attachment: ScrollViewIssue_28da167d.zip


PK Pavendhan Kumar Syncfusion Team November 3, 2016 07:46 AM

Hi Magesh,

Thank you for your update.

We have created sample as per your scenario (Removing the color between DrawerHeaderView and DrawerContentView, Scrolling inside DrawerContentView). Please download the sample from the following link.

Link: http://www.syncfusion.com/downloads/support/forum/127152/ze/NavigationDrawer1271532029443568 

And please let us know whether given sample meets your requirement. If not please create a support incident and update us with more details like code snippet or sample project to reproduce the reported behaviour that would help us to work inline with your requirement.

Regards,
Pavendhan K. 


Loader.
Live Chat Icon For mobile
Up arrow icon