Skip to content

Commit

Permalink
Changed class name.
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianAntonowicz committed Jul 13, 2018
1 parent aee46fb commit 02ce4a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
using Xamarin.Forms.Platform.Android.AppCompat;
using XamarinForms.CancelableModal.Droid.Renderers;

[assembly: ExportRenderer(typeof(NavigationPage), typeof(CustomPageRenderer))]
[assembly: ExportRenderer(typeof(NavigationPage), typeof(CustomNavigationPageRenderer))]

namespace XamarinForms.CancelableModal.Droid.Renderers
{
public class CustomPageRenderer : NavigationPageRenderer
public class CustomNavigationPageRenderer : NavigationPageRenderer
{
private Toolbar _modalToolbar;

public CustomPageRenderer(Context context)
public CustomNavigationPageRenderer(Context context)
: base(context)
{
}
Expand All @@ -25,7 +25,7 @@ protected override void OnAttachedToWindow()
{
base.OnAttachedToWindow();

if (Element.CurrentPage is IModalPage modalPage)
if (Element.CurrentPage is IModalPage)
{
var activity = Context as FormsAppCompatActivity;
var content = activity.FindViewById(Android.Resource.Id.Content) as ViewGroup;
Expand Down Expand Up @@ -53,7 +53,7 @@ protected override void OnLayout(bool changed, int l, int t, int r, int b)

if (Element.CurrentPage is IModalPage)
{
_modalToolbar.SetNavigationIcon(Resource.Drawable.baseline_close_white_24);
_modalToolbar?.SetNavigationIcon(Resource.Drawable.baseline_close_white_24);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Droid/XamarinForms.CancelableModal.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<ItemGroup>
<Compile Include="Extensions\ViewGroupExtensions.cs" />
<Compile Include="MainActivity.cs" />
<Compile Include="Renderers\CustomPageRenderer.cs" />
<Compile Include="Renderers\CustomNavigationPageRenderer.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down

0 comments on commit 02ce4a2

Please sign in to comment.