-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
using Xamarin.Forms; | ||
using Xamarin.Forms.Internals; | ||
using Xamarin.Forms.Platform.iOS; | ||
using IosMvxImageView = MvvmCross.Binding.iOS.Views.MvxImageView; |
There was a problem hiding this comment.
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; } |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
Done |
@@ -138,7 +149,7 @@ | |||
</ProjectReference> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Include="MvxFormsApplicationActivity.cs.txt" /> | |||
<None Include="MyApplicationActivity.cs.txt" /> |
There was a problem hiding this comment.
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
Hay forgot to save! |
Don't worry, i fixed it. Thanks a lot! |
No description provided.