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
Related
A bit of context here. I'm an iOS developer with no knowledge on Android development.
I need to know whether it's feasible in Android to embed custom interactive UI elements (in iOS that'd be a UIView) inside of EditText.
A library I found to do this in iOS is: https://github.com/vlas-voloshin/SubviewAttachingTextView
You can see a GIF in that link showcasing the kind of behavior I'm looking for.
Is there built in support, or any third party library I can use to achieve something similar in Android?
in normal way this is not possible in android and we don't have any standard component or any library (that i know) for doing such a thing but we can create something similar to this (for this you should search about custom Views in android !) and also there is other way and easier way to achieve something similar to this is using the container layouts in android like LinearLayout and adding all your component to that container layout in run-time base on your text ! for example in your code you can dive in to your text and find tags like or and create appropriate view for your tag and add it to your container layout and at the end your layout looks like that gif wich is in your question ! and also in android we can show some basic html code in textView
I'm wondering if there is such framework or tool to define and declare controller in Android similar to IOS.
I don't want to have so many boilerplates for just defining a simple button or edittext controller using an xml and then create a handler for it inside code I want to use something similar following lines :
#controller
Button mybutton;
Is there any framework available for doing such in Android?(I googled it but I couldn't find any clue except for GreenDroid which is not I'm looking for)
Try this lib github.com/excilys/androidannotations.
P.S. But seriously listen to the #Simon and and try Android way;)
I am working on android app where I am thinking to develop reusable UI interface. How it can be developed and included in my .xml's
Here I want to develop a progress bar with my image and it will be display on some .xml's.
Please provide any code help.
I am a new in this field.
you can use <Include> xml tag within your layout xml,
read this :)
http://developer.android.com/resources/articles/layout-tricks-merge.html
I think you need to use styles and themes. Check this out.
You can either build custom (compound) views, look at Building Custom Components.
Or you can use Fragments. Fragments are new in Honeycomb (Android 3.0), but there is a compatibility library that adds fragment support to lower android versions (can be found in your ANDROID_SDK/extras/android folder). Or you can mix both of course.
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
There are no controls in Android that provide Tree-like View. There is an ExpandableList View which I suspect could be used to creating one.
Have you tried imlpementing such a control?
How would one implement such a control in Android?
Our company just open-sourced a small widget that is doing just that... You can see all the sources and add the project (as a library) to your own android project:
http://code.google.com/p/tree-view-list-android/
take a look at ExpandableListView. Besides, see following thread:
http://www.mail-archive.com/android-beginners#googlegroups.com/msg03587.html
this solutions are, very complicate. but can use a ExpandableListView of more levels.
Example: How to implement multilevel ExpandableListview in Android?