I am easily able to set Action bar Title in xamarin Android as follows
[Activity(Label="My App")]
How can I align above label in center?
I am easily able to set Action bar Title in xamarin Android as follows
[Activity(Label="My App")]
How can I align above label in center?
As Yuri S suggested, if your Activity
is subclass of AppCompatActivity
, then you may code for example SupportActionBar.SetCustomView(Resource.Layout.mytoolbar);
to apply your custom action bar.
But if you want to inherit your activity from default Activity
, you can also create your own Toolbar
for action bar, and then in the OnCreate
of your activity, code like this:
ActionBar.SetDisplayShowCustomEnabled(true);
ActionBar.SetCustomView(Resource.Layout.mytoolbar);