I made custom renderer for NavigationPageRenderer but I cant change the burger menu button ContentDescription. It reads burger menu button as "OK" button. Do you have some ideas?
1
-
Idea: don't use xamarin – ChrisCM Sep 15 '18 at 15:20
-
@ChrisCM and which crossplatform do you recommend? – Milan MiNo Michalec Sep 17 '18 at 8:20
1
It's a ImageButton
in Android platform. So you can change the image source of this hamburger button to implement this feature.
You could use Custom Renderers to create a custom MasterDetailPage
, here is an example:
[assembly: ExportRenderer(typeof(MasterDetailPage), typeof(MyMasterDetailRenderer))]
...
public class MyMasterDetailRenderer : MasterDetailPageRenderer
{
public MyMasterDetailRenderer(Context context) : base(context)
{
}
protected override void OnLayout(bool changed, int l, int t, int r, int b)
{
base.OnLayout(changed, l, t, r, b);
var toolbar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
for (var i = 0; i < toolbar.ChildCount; i++)
{
var imageButton = toolbar.GetChildAt(i) as ImageButton;
var drawerArrow = imageButton?.Drawable as DrawerArrowDrawable;
if (drawerArrow == null)
continue;
imageButton.SetImageDrawable(Context.GetDrawable(Resource.Mipmap.hamburger));
}
}
}
-
-
can you also help me with my .resx files? how can I get them there? – Milan MiNo Michalec Sep 17 '18 at 14:34
-
@MilanMiNoMichalec, I would suggest you open a new ticket in SO about your issue, :) – York Shen Sep 18 '18 at 1:03