MvvmCross / MvvmCross-AndroidSupport

Android support library packages for MvvmCross: The .NET MVVM framework for cross-platform solutions.
http://mvvmcross.com
15 stars 0 forks source link

MvxSpinner binding issue #201

Closed nicolgit closed 8 years ago

nicolgit commented 8 years ago

Stand alone Git Repository: https://github.com/NicolaDelfino/NicolGit-Tmp-01.git

Steps to reproduce

  1. start the app
  2. on the app start page you can see:
    • Use the menu to browse...
    • aaaa1
    • aaaa2
    • lorem ipsut dixit
  3. on visual studio output window there is the following message:

MvxBind:Warning: 0.89 Failed to create target binding for binding SelectedItem for SelectedLanguage 03-26 18:16:54.227 I/mono-stdout( 6918): MvxBind:Warning: 0.89 Failed to create target binding for binding SelectedItem for SelectedLanguage [0:] MvxBind:Warning: 0.89 Failed to create target binding for binding SelectedItem for SelectedLanguage

Expected behavior

on the app start page I should see:

MvxSpinner binding on SelectedItem is not working

Configuration

Version: 4.0.0

smulrich commented 8 years ago

I am having the same issue. I implemented according to the API examples:

https://github.com/MvvmCross/MvvmCross-Tutorials/blob/master/ApiExamples/ApiExamples.Core/ViewModels/ViewModels.cs

https://github.com/MvvmCross/MvvmCross-Tutorials/blob/master/ApiExamples/ApiExamples.Droid/Resources/Layout/Test_Spinner.axml

List is populated but binding to SelectedItem is not working.

ghost commented 8 years ago

You guys are missing this in your droid setup.cs

        protected override void FillTargetFactories(IMvxTargetBindingFactoryRegistry registry)
        {
            base.FillTargetFactories(registry);
            MvxAppCompatSetupHelper.FillTargetFactories(registry);
        }
martijn00 commented 8 years ago

Add the override to your setup and it will work.

ErgilV commented 8 years ago

In the github sample there is no code as per martijn00's comment. I fail to understand as well from what library the MvxAppCompatSetupHelper is comming. Could someone try explain the solution mentioned above?

kjeremy commented 8 years ago

https://github.com/MvvmCross/MvvmCross-AndroidSupport/search?utf8=%E2%9C%93&q=MvxAppCompatSetupHelper

On Wed, Nov 2, 2016 at 11:16 AM, ErgilV notifications@github.com wrote:

In the github sample there is no code as per martijn00's comment. I fail to understand as well from what library the MvxAppCompatSetupHelper is comming. Could someone try explain the solution mentioned above?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MvvmCross/MvvmCross-AndroidSupport/issues/201#issuecomment-257895877, or mute the thread https://github.com/notifications/unsubscribe-auth/AEIBRHU4j7elxi3EJm12iKeWMNV1Spm6ks5q6Kk9gaJpZM4H5SMD .