N=18 - Android Custom Controls - N+1 Days of MvvmCross
Why Stack Overflow recommends it
Stack Overflow users link it when they need a worked example of writing custom Android controls and wiring them into MvvmCross data binding.
Recommended by 0 people across 0 different months, 2013 to 2014.
What it is
Episode 18 of Stuart Lodge's 'N+1 Days of MvvmCross' series, a roughly 27-minute screencast on building custom Android controls with MvvmCross. It shows how to subclass existing views and widgets and how to create custom-drawn controls, and builds an MvxSpinner-style example live.
What people said
Cites Stuart · 2013-05 · Stack Overflow · on “MvvmCross: What is the best way to get the selected item from an MvxListView in android?”
For android, the most common technique is to bind ItemClick to an MvxCommand<TItem> - so use: local:MvxBind="ItemClick ItemSelectedCommand" You can see this in operation in examples including: DailyDilbert - [LINK] OldTutorial - [LINK] N=16 - Collect-A-Bull - see [LINK] and [LINK] Less common (so far), for Android, you can also bind to a custom binding SelectedItem on MvxListView This technique is shown on a Spinner ( MvxSpinner ) in MoreControls - [LINK] (this example is constructed live during the N=18 video - see [this video]
Cites jmmontero · 2013-06 · Stack Overflow · on “View type not found in customControl”
I created a Custom Control, follow this video [this video] . When I access to View, the app crash and exit. There are my log. mvx:Diagnostic: 28,78 Showing ViewModel DrawingViewModel 06-10 00:26:39.499 I/mvx (26433): 28,78 Showing ViewModel DrawingViewModel 06-10 00:26:39.499 I/mono-stdout(26433): mvx:Diagnostic: 28,78 Showing ViewModel DrawingViewModel mvx:Diagnostic: 29,03 Loading new ViewModel from Intent with Extras 06-10 00:26:39.748 I/mvx (26433): 29,03 Loading new ViewModel from Intent with Extras 06-10 00:26:39.768 I/mono-stdout(26433): mvx:Diagnostic: 29,03 Loading new ViewModel from Intent with Extras MvxBind:Error: 29,12 View type not found - mymvvmcross.droid.controls.DrawingBoardCont
Cites Hubi · 2013-08 · Stack Overflow · on “Android MapFragment as custom control in MvvmCross”
I'm working on a project in which I can use MapFragment or SupportMapFragment as a custom control. I tried to mix custom control( N-18 [this video] ) and Fraggle( N-26 [LINK] ) tutorial but I can't make it work. My Custom Control Class: public class CustomMapView : MvxFragment { public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { var ignored = base.OnCreateView(inflater, container, savedInstanceState); return this.BindingInflate(Resource.Layout.CustomMapViewLayout, null); } } My CustomMapViewLayout.axml <?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android=" [LINK] " android:id="@+id/map" android:layout_width="match_parent" android
Cites 79IT · 2014-01 · Stack Overflow · on “How to create a custom control with MvvmCross Droid VideoView”
I have a viewmodel for searching for videos which works great. I have added a play button and upon clicking I want to load a view that renders a VideoView. The search viewmodel contains enough data to generate the video's URL. What is the best way to render the VideoView? I've found this example but it appears to be an older version of MvvmCross: [LINK] Should I create custom control like N=18 - Android Custom Controls - N+1 Days of MvvmCross? [this video] If I create a custom control how should I pass the video's URL to the VideoView and start it playing? I'm sure this is easy to do but I can't find a working example. Thanks in advance