mvvm - Mvvmcross: launching an android dialog containing a ListView -


first, give big kudos stuart lodge awesome framework. xamarin's visual studio integration, 1 of productive cross platform frameworks have laid hands on.

what want achieve launch dialog containing selectable listview when button clicked. need access selected item when user closes dialog. there recommended way using mvvmcross' dialog plugin while following mvvm paradigm?

i using following activity create dialog.

[activity(theme = "@android:style/theme.holo.dialog")]     public class searchresultdialogview : mvxactivity     {         protected override void oncreate(bundle bundle)         {             base.oncreate(bundle);             setcontentview(resource.layout.searchresultview);         }     } 

navigating searchresultdialogviewmodel view model brings view modal. looks heading in right direction. however, dialog missing ok , cancel buttons , rid of default header. think need alertdialog far have had no success launching 1 code:

 [activity(theme = "@android:style/theme.notitlebar")]     public class searchresultdialogview : mvxactivity     {         protected override dialog oncreatedialog(int id, bundle args)         {              alertdialog.builder builder = new alertdialog.builder(this);             builder.settitle("some title");             return builder.create();         }     } 

apologies if question vague. new android ui development.

tia.

there several different uses of word dialog here.

with these in mind...

if want display general popup window collect data, can try using fragment based dialog collect data - demonstrated (with little code behind) in fragments homeview.cs namedialogfragment.cs - general background on fragments, watch n=26 in http://mvvmcross.wordpress.com/

if want use separate activity data collection, @gschackles wrote article on 1 way of returning data child viewmodels - http://www.gregshackles.com/2012/11/returning-results-from-view-models-in-mvvmcross/ - i'm sure other schemes used.

if want learn mvx dialog plugin, see n=23 in http://mvvmcross.wordpress.com/


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -