mvvmcross

MvxListView in Android with MvvmCross

我怕爱的太早我们不能终老 提交于 2019-12-12 02:17:17
问题 I'm using MvvmCross v3 and I have a little problem with list in Android. I actually have a Mvx.MvxListView who works well, but I'm working on tablet, and ListView is a little bit inapropriate. So I want to have a control like WrapPannel in XAML to have more than one item in a row. How can I have this kind of control? Thanks 回答1: There are two challenges here: 1. Find or make the control you want The first is really up to you and your UX/design team to do - although people might be able to

Example of how to use MvxCachingFragmentActivity

耗尽温柔 提交于 2019-12-12 02:15:35
问题 Update - Thanks to @Martijn00 and @Plac3Hold3r I have managed to update my app to use the MvxCachingFragmentCompatActivity but it is just not working correctly. I am finding that if I go back sometimes the the ViewModel will be available, but the commands in the view model will be null. Also if I go back and then forward, some of the buttons don't respond. I assume this is the same issue. What I really need to know is what the additional functionality the caching activity gives me, and how to

MvvmCross fragments resolving

放肆的年华 提交于 2019-12-12 01:54:39
问题 I'm using Xamarin with MvvmCross, and have problem with fragments usage. I call ShowViewModel so: public class MainViewModel : MvxViewModel { public override void Start() { ShowViewModel<MainMenuViewModel>(); } } Where MainMenuViewModel it's class: public class MainMenuViewModel : MvxViewModel { } Implemented fragment as follows: [MvxFragment(typeof(MainMenuViewModel), Resource.Id.navigation_frame)] [Register("mvvm.droid.views.MainMenuView")] public class MainMenuView : MvxFragment

Handling MvxViewModel::Close when using custom view presenters

送分小仙女□ 提交于 2019-12-11 20:26:44
问题 I am using a custom view presenter in my Windows Store app. I show a SettingsFlyout and in its SettingsViewModel view-model I have a command bound to a button on the flyout which needs to hide the flyout (SettingsFlyout::Hide()). For this, I have different options: in the SettingsFlyout, I can handle the button click in the ICommand in the view-model, send a message from view-model to view in the ICommand in the view-model, call Close(this) . I was trying to implement last one, using Close

Helping the GC in mono droid using mvvmCross

痞子三分冷 提交于 2019-12-11 19:55:08
问题 I am working with mono droid, using the mvvmcross framework provided by slodge. However I am having some memory issues. I am disposing bitmaps in the activities ondestroy methods and I am wondering if it is possible to help the GC collecting unused objects of viewmodels. If you try setting the viewmodel in the activity to null it all goes to hell and it is clearly not the right way to go. Do you guys have any suggestions to an approach? Regards 回答1: The mvx framework tries to ensure that the

MvvmCross - structuring shared View Models and Views

☆樱花仙子☆ 提交于 2019-12-11 19:22:00
问题 Love this framework thus far. That said, hit my first roadblock. I have created an MvvmCross-based library (actually a few libraries) that performs login services that will be used across multiple cross-platform applications of the same family. What I can't quite figure out is how to plug these login libraries into my other applications (which will also be using MvvmCross). I want to be able to re-use the same ViewModels and Views across these apps. Assume that I've read and watched a lot of

Garbage collecting issue with Custom viewbinding in mono touch and mvvmcross

南笙酒味 提交于 2019-12-11 18:45:38
问题 I have a custom calendar control for which there is an custom viewbinding. In this viewbinding we hook up some events which are not decoupled correct and therefor is the garbage collecting not completed. In the following is our custom view binding. As you can see the event is hooked up in the constructor and decoupled in the OnSelectedDate event is triggered(the user selects an date). Therefore if you choose a date the event is decouple correct and garbage collected but if you just go back,

Android MapFragment as custom control in MvvmCross

大兔子大兔子 提交于 2019-12-11 18:02:05
问题 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) and Fraggle(N-26) 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

Error inflating class com.google.android.youtube.player.YouTubePlayerView in ListView

为君一笑 提交于 2019-12-11 17:23:01
问题 I'm trying to get familiar with YoutubePlayerView and Mvvmcross model using Xamarin tool (for both Android, iOS) I want to create a videolist, when users click into a video, it can be played in ListView but I'm getting an error with Android Binary XML file line #1: Error inflating class com.google.android.youtube.player.YouTubePlayerView My code so far: This is the List: VideoListView.axml: <android.support.v4.widget.SwipeRefreshLayout android:layout_width="match_parent" android:layout_height

How to pass two inputs to a value converter in xamarin android

霸气de小男生 提交于 2019-12-11 15:56:27
问题 What is Happening : I am passing one boolean value to a converter and performing some action(Changing Drawable). What I am trying to do : How to pass two boolean values to a converter and perform some action. Is this possible How ? If this is not the right approach by passing two inputs to a single value converter, then how to resolve this CONVERTER : CruiseShipIndicatorValueConverter.cs public class CruiseShipIndicatorValueConverter : MvxValueConverter<bool, int> { protected override int