Check my action bar image here(My requirement) Я хочу отобразить кнопку пользовательского текстового ярлыка на билете действия xamarin.android (материальная тема), есть ли возможность сделать это в xamarin.android, пожалуйста, предложите ...Используйте пользовательский макет для значков пунктов меню действий xamarin.Android.
static Button notifCount;
static int mNotifCount = 0;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getSupportMenuInflater();
inflater.inflate(R.menu.main, menu);
View count = menu.findItem(R.id.badge).getActionView();
notifCount = (Button) count.findViewById(R.id.notif_count);
notifCount.setText(String.valueOf(mNotifCount));
return super.onCreateOptionsMenu(menu);
}
private void setNotifCount(int count){
mNotifCount = count;
invalidateOptionsMenu();
}
i tried above code converting into xamarin.android but it is showing like..
View count= menu.FindItem(Resource.Id.badge).getActionView ...Error...getActionview is not there in xamarin.
Есть ли метод GetActionView или свойство ActionView? Xamarin часто переименовывает методы и преобразует getter & seters в свойства. – dylansturg
Свойство ActionView находится в xamarin. –