——Developer
res下文件夹values-14 values-21
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 |
A dedicated space for giving your app an identity and indicating the user’s location in the app.
Access to important actions in a predictable way, such as search.
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);
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