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
close icon

SFAccordion problem in Android App

The control works in my IOS app, but I get the following message when I run the same Xamarin Forms code on Android...

Java.Lang.NullPointerException
  Message=Attempt to read from field 'int android.view.ViewGroup$LayoutParams.width' on a null object reference


3 Replies

LN Lakshmi Natarajan Syncfusion Team February 3, 2020 04:45 AM UTC

Hi Kevin,  
  
Thanks for using Syncfusion products.  
  
We have checked the reported query from our side. We suspect you are reporting the crash in below bug report,  
  
  
If yes, we would like to inform that above is the framework issue in latest Xamarin Version while loading Label directly inside AccordionItem’s Header/Content and you can follow below bug for further updates from Xamarin team. Meanwhile, we suggest that you can overcome the reported issue in sample by loading Label inside Grid.   
   
Actual Code   
Expected Code   
<Syncfusion:SfAccordion> 
    <Syncfusion:SfAccordion.Items> 
        <Syncfusion:AccordionItem> 
           <Syncfusion:AccordionItem.Header> 
               <Label Text=”Category”/> 
           </Syncfusion:AccordionItem.Header> 
 
           <Syncfusion:AccordionItem.Content> 
               <Label Text=”Hamburger”/> 
           </Syncfusion:AccordionItem.Content> 
        </Syncfusion:AccordionItem> 
     </Syncfusion:SfAccordion.Items> 
<Syncfusion:SfAccordion> 
<Syncfusion:SfAccordion> 
    <Syncfusion:SfAccordion.Items> 
        <Syncfusion:AccordionItem> 
           <Syncfusion:AccordionItem.Header> 
               <Grid>  
                   <Label Text=”Category”/> 
               </Grid> 
           </Syncfusion:AccordionItem.Header> 
 
           <Syncfusion:AccordionItem.Content> 
               <Grid>  
                  <Label Text=”Hamburger”/> 
               </Grid> 
           </Syncfusion:AccordionItem.Content> 
        </Syncfusion:AccordionItem> 
     </Syncfusion:SfAccordion.Items> 
<Syncfusion:SfAccordion> 
   
If no and you are facing any other crash other than above, kindly share more details or revert us back with more detail of exception details in order to analyze and provide better solution at our end.  
  
Regards,  
Lakshmi Natarajan 



PR Padmini Ramamurthy Syncfusion Team February 4, 2020 05:22 AM UTC

From: Kevin Landgrave 
Sent: Monday, February 3, 2020 4:05 PM
To: Syncfusion Support <support@syncfusion.com>
Subject: RE: Syncfusion support community forum 151157, SFAccordion problem in Android App, has been updated. 
  
Wrapping everything in a Grid fixed this for me. 

Thanks! 




LN Lakshmi Natarajan Syncfusion Team February 4, 2020 05:53 AM UTC

Hi Kevin, 
 
Thanks for the update. 
  
We are glad that reported issue have been resolved at your end. Please let us know if you need any further update. As always we are happy to help you out. 
 
Regards, 
Lakshmi Natarajan 


Loader.
Live Chat Icon For mobile
Up arrow icon