Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Custom style navigation position change

$
0
0

Normally, the navigation style code:

ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
ActionBar.SetBackgroundDrawable((Android.Graphics.Drawables.Drawable)Resources.GetDrawable(Resource.Drawable.navback));
AddTabToActionBar(Resource.String.lab1, Resource.Drawable.ic_action_whats_on, c);

Effect:

If I use custom styles, code:

`ActionBar.NavigationMode = ActionBarNavigationMode.Tabs; LayoutInflater inflate = LayoutInflater; mCustomView = inflate.Inflate(Resource.Layout.action_bar_custom, null); ActionBar.SetCustomView(mCustomView,new ActionBar.LayoutParams(ActionBar.LayoutParams.WrapContent,ActionBar.LayoutParams.FillParent));

        ActionBar.DisplayOptions = ActionBarDisplayOptions.ShowCustom;

ActionBar.SetBackgroundDrawable((Android.Graphics.Drawables.Drawable)Resources.GetDrawable(Resource.Drawable.navback)); AddTabToActionBar(Resource.String.lab1, Resource.Drawable.ic_action_whats_on, c);`

Effect:

I want to use a custom style, the effect of the first picture with the same effect My English level is not high, I do not know whether he understands what I said.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>