App Bar

——Developer

values-v14

res下文件夹values-14 values-21

Develop > Reference > R.attr displayOptions

Options affecting how the action bar is displayed.

Must be one or more (separated by “|”) of the following constant values.

Constant Value
none 0
useLogo 0x1
showHome 0x2
homeAsUp 0x4
showTitle 0x8
showCustom 0x10
disableHome 0x20

Develop > Training > Adding the App Bar

app bar的主要作用(key function)

  1. A dedicated space for giving your app an identity and indicating the user’s location in the app.

  2. Access to important actions in a predictable way, such as search.

  3. Support for navigation and view switching(with tabs or drop-down lists

#

how to use the v7 appcompat support library’s Toolbar widget as an app bar.

other ways to implement an app bar
ActionBar as an app bar.
如果是Action Bar,去掉阴影,在Activity onCreate()中加上

    getSupportActionBar().setElevation(0f);

1. Setting Up the App Bar

Add a Toolbar to an Activity
- Add the v7 appcompat support library to your project
- Make sure the activity extends AppCompatActivity

public class MyActivity extends AppCompatActivity {
}

啊呀,写不下去了,其实也看不下去了。
官方文档好的多,go

你可能感兴趣的:(app-bar,value-v14)