How can set action bar title in center in Android?

How can set action bar title in center in Android?
Answer
If you want to set a custom background, set it in the Layout above (but then don’t forget to set android_layout_height=”match_parent” ). Define your own custom view with title text, then pass LayoutParams to setCustomView(), as Sergii says. ActionBar actionBar = getSupportActionBar() actionBar.
 

Tìm kiếm

Back
Top