Help with creating a compound component in Mono for Android - android

I would like to create a compound component that consists of a TextView (integer only) and two buttons that would be used to make an up/down (increment) button. I am using Mono for Android (MonoDroid) but no matter what I do I cannot get it to work, I keep getting an error about the java class not being found.
If anyone has any experience with this and can assist I would greatly appreciate it.
Thank you.

Without any details, all I can do is take a blind stab at the answer.
My guess is you've created your own View class in C#, and are trying to reference it in a layout file. You need to reference it using the Java name and not the C# name.
See this documentation for more:
http://mono-android.net/Documentation/Guides/Using_Custom_Views_in_a_Layout

Related

I was trying to use edit text id and it is showing errors , can you please help me

I am beginner to Android Development using Kotlin and i was making a toast with my editText id but it is showing errors please help me.
image linkerror activity
xml code
Try to understand Google's recommended way of finding views from XML with view binding you may find a great article at this page
The way you have started learning might create conflicts and null pointer exceptions. It is not the right way!

trouble with layout android Not Able to generate this View According to icons and line and below text

I am designing following layout structure for one of my application. But dont know how to implement it.
This Design is called Stepper. There are lot of open source library is available for this design. Check the following link. May it will help you.
https://android-arsenal.com/details/1/3049

Equivalent to UserControl in Android with the MvvmCross framework

I would like to know if there is any equivalent to UserControl in Xamarin.Android using the MvvmCross framework. Because I have a MvxActivity containing a layout I would like to reuse in several Views. And I don't know how to call it in my these several views.
If you have any idea...
Thanks for any help !
You could try the MvxFrameControl at the end of N=26 in http://mvvmcross.blogspot.co.uk/
The source code for MvxFrameControl also shows you how to inherit from any Android control in order to add data-binding capabilities - see https://github.com/MvvmCross/MvvmCross/blob/v3.1/Cirrious/Cirrious.MvvmCross.Binding.Droid/Views/MvxFrameControl.cs

Memory friendly : View in xml or java class?

I am starting with development in android apoplications, but not sure about the creation of views.
Which one of the two is more preferable in terms of memory-consumption for creation of views : XML or Java Class ?
Can you please suggest which approach is more memory-friendly either XML or Java classes for creation of view ?
There is ultimately Java behind the xml..
so both are same as creating from Java or using xml.
XML help us to customize Views quickly and drag & drop graphically.
The Layout tricks actually works. (For example: Here is an illustration to optimize the memory consumption.)
If you are just starting with the development and you are new to android..go with XML its easier to understand and experiment with.there are a lot of tutorials around.
Java classes are usually used to set view dynamically..so i would suggest start with XML and move to simple Java tutorials.
with memory friendly part(i dint get what you are trying to say) if its about the load time or the CPU usage.its non the less same.
For the purpose of memory-consumption XML Views are best to use but if you want to make your View Dynamic as you receive data from the Server or from any other resource at run time Then you can use Java for creating those Views.

Need example code of an expandableListView on Android 2.3.3

I need a working example of an application that uses an expandableListView. I have no idea how to set data in it. I have tried with the new ArrayAdapter(...). But I can't figure out how to create the correct parameters.
Thanks in advance!
PS: I've used some code already but it needs some kind of resource out of the R, R.layout.simple_list_1. It's not declared anywhere but still most of the people seem to have it?
The API demos are a great source for these basic examples
I've used some code already but it needs some kind of resource out of the R, R.layout.simple_list_1. It's not declared anywhere
That is a reference to an built-in XML layout document that is part of the Android OS. Use android.R.layout.simple_list_item_1 if you cannot resolve it.
check this one :
expandable list
hope it helps!

Categories

Resources