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

Adding a control to .axml

Hi,

I have been looking through the documentation and samples trying to figure out how to add controls (specifically sfnumerictextbox) to .axml layout files, however all the examples I have seen simply set the content of the layout file from the activity.
I have added the reference for the control to my android project but I cannot figure out the correct xmlns declaration for adding the control to the .axml.

Are there any samples that declare the control in the layout file?

Regards

Francis


7 Replies

CP Chozarajan Pandiyarajan Syncfusion Team September 22, 2016 12:30 PM UTC

Hi Francis,

Thanks for your patience.

We have created a sample as per your request (NumericTextBox in axml). Further testing the sample, we have encountered same issue in NumericTextBox while adding in axml. We have logged bug report for the same.

A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/

Regards,
Chozarajan P 



HR Héctor Reyes September 27, 2016 04:19 PM UTC

Hi, I need a copy of that example


PK Pavendhan Kumar Syncfusion Team September 28, 2016 09:58 AM UTC

Hi Hector,

Thank you for contacting Syncfusion support.

We have created a sample as per your requirement “Creating a sample using NumericTextBox by axml code”. Please download the same from the following link.

Link: http://www.syncfusion.com/downloads/support/forum/126040/ze/NumericTextBox_1260401145801228 

Regards,
Pavendhan K. 



HR Héctor Reyes September 29, 2016 01:31 AM UTC

Thanks  !



Just one question, i can use this form of implementation for any control?


PK Pavendhan Kumar Syncfusion Team September 29, 2016 06:17 AM UTC

Hi Hector,

Thanks for your update.

Query:Can I use this form of implementation for any control?

Yes, you can implement sample for any control by using this form. Please let us know if you are facing any issues and we will be happy to assist you.

Regards,
Pavendhan K.


DM Derek Mitchell August 15, 2019 01:27 PM UTC

Hi there

I am trying to use SfNumericUpDown in axml, however when the OnCreate event tries to load the axml file it gives this error:

Android.Views.InflateException: Binary XML file line #1: Binary XML file line #1: Error inflating class com.syncfusion.Numericupdown.SfNumericUpDown

Can you assist? Thank you

 <com.syncfusion.Numericupdown.SfNumericUpDown
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/numeric"
            android:indeterminate="true"
            android:layout_gravity="center" />


LR Lakshmi Radha Krishnan Syncfusion Team August 19, 2019 05:03 PM UTC

Hi Derek,

 

We have checked the SfNumericUpDown control in the axml file using the version 17.2.0.34 version. We are afraid that we are not able to reproduce the reported issue in the latest version. Please refer the tested sample for your reference.

 

Please let us know if you are facing any problem.

 

Regards,

Lakshmi R.


Attachment: NumericUpDown_axml_aa506115.zip

Loader.
Live Chat Icon For mobile
Up arrow icon