[study notes] change the ActionBar related display
Change the background color of ActionBar
1) Open the res- > styles.xml file, modify its contents, add a style named myAppTheme, integrate the theme into Theme.Holo or its subclasses, and reference an actionbar
2) create a new style of the myActionBar referenced above, and configure the background color of the actionbar
3) in ManifestActivity, the theme in application should be the custom theme
Change the text of ActionBar and center it.
1) create a new xml file for layout, add a textview, and configure text, color and size
2) in the onCreate function of MainActivity, get the actionBar of the current activity through the code, bind the actionBar to the layout we just created, and configure the display to be custom
Third, add the return key in the upper left corner
The return key in the upper left corner of actionbar is hidden by default, so set it to open in the onCreate function and override the onOptionsItemSelected function.
Redefine a view resource that returns an arrow in the res- > styles.xml file