Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Forms activity needs to forward events to ActivityLifetimeListener #1762

Merged
merged 11 commits into from
May 3, 2017

Conversation

LRP-sgravel
Copy link
Contributor

No description provided.

using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform.iOS;
using IosMvxImageView = MvvmCross.Binding.iOS.Views.MvxImageView;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always start naming conventions with Mvx. So MvxIosImageView

{
class MvxImageViewRenderer : ImageRenderer
{
private IosMvxImageView _NativeControl { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Private accessors should not start with capital letter. _nativeControl

@@ -89,18 +90,18 @@ protected IMvxImageHelper<Bitmap> ImageHelper
}
}

public MvxImageView(Context context, IAttributeSet attrs, int defStyleAttr)
public MvxImageView(Context context, IAttributeSet attrs, int defStyleAttr, Action afterImageChangeAction = null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this to imageChanged or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, I used the variable name from the iOS version so I'll change both

@@ -13,8 +13,8 @@ using Xamarin.Forms.Platform.Android;
namespace Namespace
{
[Activity(Label = "View for anyViewModel", ScreenOrientation=ScreenOrientation.Portrait)]
public class MvxFormsApplicationActivity
: FormsApplicationActivity
public class MyApplicationActivity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need to keep this file?

@LRP-sgravel
Copy link
Contributor Author

Done

@@ -138,7 +149,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="MvxFormsApplicationActivity.cs.txt" />
<None Include="MyApplicationActivity.cs.txt" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also remove it from the csproj

@martijn00 martijn00 merged commit 28eff88 into MvvmCross:develop May 3, 2017
@LRP-sgravel
Copy link
Contributor Author

Hay forgot to save!

@martijn00
Copy link
Contributor

martijn00 commented May 3, 2017

Don't worry, i fixed it. Thanks a lot!

@martijn00 martijn00 added this to the 5.0.0 milestone May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants