mvvmcross

MvvMCross bind to <include> in android layout

风流意气都作罢 提交于 2019-12-10 16:52:45
问题 Is it possible to bind an object X to the include tag, so that the context of binding in the included layout is X ? I want to use a layout multiple times, but not in a list. MainLayout.xml ... <include android:id="@+id/btnDealerMap" android:layout_width="64dp" android:layout_height="64dp" android:visibility="gone" layout="@layout/ServiceBarButtonPhone" local:MvxBind="??? X" /> ... ServiceBarButtonPhone.xml Title and Text are properties of X . <RelativeLayout xmlns:android="http://schemas

ViewModel null when Activity started from IntentFilter

北城以北 提交于 2019-12-10 15:54:11
问题 I am trying to use NFC along with MvvmCross. So I have created an IntentFilter which looks like this: [IntentFilter(new[]{"android.nfc.action.NDEF_DISCOVERED"}, Categories = new[] {"android.intent.category.DEFAULT"}, DataScheme = "bksv-resource", DataHost = "nmt")] And in OnResume I am looking for Intent Actions of the type NfcAdapter.ActionNdefDiscovered . What happens is when NDEF is discovered, the Activity gets created and an Intent is set with the data inside. All this works fine in an

Is there a different method to bind iOS ICommands in MvvmCross 3.0.14?

此生再无相见时 提交于 2019-12-10 13:48:25
问题 The tutorial N=5 of the N+1 days of MvvmCross builds fine in Xamarin Studio when downloaded. However, if I update the assemblies from 3.0.5 to 3.0.14, the iOS project no longer builds. The error has to do with these two lines: set.Bind(button).To(vm => vm.MyCommand); set.Bind(button2).To(vm => vm.GoSecondCommand); The error message is as follows: Cannot convert `lambda expression' to non-delegate type `string' Has there been a change to the way this works? The object browser shows the correct

MvvmCross vnext: merge plugins with monodroid

落爺英雄遲暮 提交于 2019-12-10 13:45:43
问题 I'm trying to merge plugins library projects into a single one (for example, Location + PhoneCallTask). It works perfectly with wp7, but I get an unhandled exception with monodroid: Could not load file or assembly 'Cirrious.MvvmCross.Plugins.Location.Droid.dll' Of course, the location plugin is referenced in 'Cirrious.MvvmCross.Plugins.Droid.dll', the merged library. Is there a way to point to the merged library path? 回答1: Having considered your question more fully... I'm still not entirely

Community Sqlite NOT Handling Dates & DateTimes Correctly

末鹿安然 提交于 2019-12-10 11:43:27
问题 It seems that this new version is not handling dates correctly . Please see the below observations: 1) When using the below: _conn.Create<MyTable>(); And I have a DateTime field in MyTable class, then, it's creating it as BIGINT column inside the SQLite DB. 2) If I change the BIGINT column to a datetime -to match the DateTime definition in MyTable class-any existing rows are read back as 01/01/0001 ! 3) If I try to save a date value into that datetime field, say, set it to DateTime.Today it's

mvvmcross navigation issue, getting exception: Could not find view for [ViewModelName]

て烟熏妆下的殇ゞ 提交于 2019-12-10 11:29:02
问题 I seem to be confused at how to make MvvmCross detect my ViewModels that are associated with views in Mono for Android. I tried to follow TwitterSearch in implementing the navigation but it just won't work. RequestNavigate<LoginViewModel>(); here's my view: [Activity(Label = "Login")] public class LoginActivity : MvxBindingActivityView<LoginViewModel> { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); App.InitializeRestConnection(this); } protected override void

Using MvxImageViewLoader to load a resource image, is it possible?

半城伤御伤魂 提交于 2019-12-10 11:27:16
问题 I'm using mvvmcross binding in a MvxTableViewCell, the cell elements are an UIImageView and 2 labels. These "rows"/cells will list a set of predefined elements, the image of these elements are png files that exist inside the Resources directory (bundle resource) or at any place on the internet. Since I might have this mix of images that exist in the bundle and on the internet I would like to use MvxImageViewLoader. The view model has a list of objects that contain a property that is the image

MVVMCross Nested Recyclerview Out of Memory Issue

て烟熏妆下的殇ゞ 提交于 2019-12-10 11:19:24
问题 I have tried to create nested recyclerview in combination with the mvvmcross-framework which actually worked quite easily, but now I'm getting out of memory exceptions. Scenario I have a list of around 3000 entries with complex and long names, which are divided by 8 categories. The user can select the entries via a checkbox to assign them to a task later on. Even if it might sound like there are too many entries, it is actually quite easily to navigate through them, if the user has some

Does MVVMCross support ActionBar?

人盡茶涼 提交于 2019-12-10 10:29:32
问题 I was doing a quick experiment and I was wondering if I have to use MvxTabsFragmentActivity or is it possible to do this using the standard ActionBar logic? I tried to implement it but if I do something similar to this example I get issues with MvxFragment not being able to be converted to Android.App.Fragment. I was researching this a little and it may be due to a namespace conflict with the v4 support library. Can anyone shed any light on this? Is MvxTabsFragmentActivity Android's "old" way

MvvmCross Naming Conventions

浪子不回头ぞ 提交于 2019-12-10 10:08:14
问题 I'm pretty new to MvvmCross and understand that successful use of the framework relies on specific naming conventions in some areas. I have been looking around trying to find information on these naming conventions, but apart from figuring some of them out from watching various videos, I haven't been able to find anything that explains all the requirements in one place. Any suggestions? 回答1: The naming conventions used: in bindings are in https://github.com/MvvmCross/MvvmCross/wiki