ActionBar官方教程(1)简介及各区域介绍
Action Bar
The action bar is a window feature that identifies the user location, and provides user actions and navigation modes. Using the action bar offers your users a familiar interface across applications that the system gracefully adapts for different screen configurations.
The action bar is split into four different functional areas that apply to most apps.

1,App icon
The app icon establishes your app's identity. It can be replaced with a different logo or branding if you wish. Important: If the app is currently not displaying the top-level screen, be sure to display the Up caret to the left of the app icon, so the user can navigate up the hierarchy. For more discussion of Up navigation, see the Navigation pattern.

2,View control
If your app displays data in different views, this segment of the action bar allows users to switch views. Examples of view-switching controls are drop-down menus or tab controls. For more information on view-switching, see the App Structure pattern.
If your app doesn't support different views, you can also use this space to display non-interactive content, such as an app title or longer branding information.
3,Action buttons
Show the most important actions of your app in the actions section. Actions that don't fit in the action bar are moved automatically to the action overflow. Long-press on an icon to view the action's name.
4,Action overflow
Move less often used actions to the action overflow.
The action bar provides several key functions:
- Provides a dedicated space for giving your app an identity and indicating the user's location in the app.
- Makes important actions prominent and accessible in a predictable way (such as Search).
- Supports consistent navigation and view switching within apps (with tabs or drop-down lists).
For more information about the action bar's interaction patterns and design guidelines, see the Action Bar design guide.
The ActionBar APIs were first added in Android 3.0 (API level 11) but they are also available in the Support Library for compatibility with Android 2.1 (API level 7) and above.
This guide focuses on how to use the support library's action bar, but if your app supports only Android 3.0 or higher, you should use the ActionBar APIs in the framework. Most of the APIs are the same—but reside in a different package namespace—with a few exceptions to method names or signatures that are noted in the sections below.
Caution: Be certain you import the ActionBar class (and related APIs) from the appropriate package:
- If supporting API levels lower than 11:
import android.support.v7.app.ActionBar - If supporting only API level 11 and higher:
import android.app.ActionBar
Note: If you're looking for information about the contextual action bar for displaying contextual action items, see the Menu guide.
ActionBar官方教程(1)简介及各区域介绍的更多相关文章
- ActionBar官方教程(11)自定义ActionBar的样式(含重要的样式属性表及练习示例)
Styling the Action Bar If you want to implement a visual design that represents your app's brand, th ...
- ActionBar官方教程(10)ActionBar的下拉列表模式
Adding Drop-down Navigation As another mode of navigation (or filtering) for your activity, the acti ...
- ActionBar官方教程(9)ActionBar的顶部tab模式(注意,已经被弃用)
This interface is deprecated.Action bar navigation modes are deprecated and not supported by inline ...
- ActionBar官方教程(6)把图标变成一个返回到上级的按钮,同一个app间,不同app间,不同fragment间
Navigating Up with the App Icon Enabling the app icon as an Up button allows the user to navigate yo ...
- ActionBar官方教程(5)ActionBar的分裂模式(底部tab样式),隐藏标题,隐藏图标
Using split action bar Split action bar provides a separate bar at the bottom of the screen to displ ...
- ActionBar官方教程(3)更改标题处的图片
Using a logo instead of an icon By default, the system uses your application icon in the action bar, ...
- ActionBar官方教程(2)选主题让应用支或不支持ActionBar及支持ActionBar的应用如何隐藏和显示
Adding the Action Bar As mentioned above, this guide focuses on how to use the ActionBar APIs in the ...
- ContentProvider官方教程(2)简介、Content URIs
In this document Overview Accessing a provider Content URIs Content Provider Basics A content provid ...
- Intent官方教程(1)简介和作用
Intents An Intent is a messaging object you can use to request an action from another app component. ...
随机推荐
- 使用Linq 来解决Datatable 去除数据重复
在这也说明下,除此之外还可以通过 DataView 的方式来处理,当个人觉得这有点不好用.这里就不多作说明了 代码比较简单,直接看代码 using System; using System.Colle ...
- ###学习《C++ Primer》- 2
点击查看Evernote原文. #@author: gr #@date: 2014-10-01 #@email: forgerui@gmail.com Part 2: STL顺序容器(第9章) 一.标 ...
- 第九篇、UITabbar增加类别用来标红点
1.系统中只有设置bage的方式,设置为nil也是为一个红点,但是很大,并不是我们需要的 2.扩充标红点的方法 (常用于有新的动态提示标志) #import <UIKit/UIKit.h> ...
- OC3_字典
// // main.m // OC3_字典 // // Created by zhangxueming on 15/6/12. // Copyright (c) 2015年 zhangxueming ...
- javascript学习笔记20160121-css选择器
元素可以用id.标签名或类来描述: 更一般的,元素可以基于属性来选取: 这些基本的选择器可以组合使用: 选择器可以指定文档结构(重要,之前一直不太明白>的使用): 选择器可以组合起来选取多个或多 ...
- SpringInAction读书笔记--第2章装配Bean
实现一个业务需要多个组件相互协作,创建组件之间关联关系的传统方法通常会导致结构复杂的代码,这些代码很难被复用和单元测试.在Spring中,对象不需要自己寻找或创建与其所关联的其它对象,Spring容器 ...
- 九度OJ1198 a+b 【高精度整数】
题目地址:http://ac.jobdu.com/problem.php?pid=1198 题目描述: 实现一个加法器,使其能够输出a+b的值. 输入: 输入包括两个数a和b,其中a和b的位数不超过1 ...
- Java 使用反射拷贝对象一般字段值
在<Java解惑>上面看到第八十三例--诵读困难者,要求使用非反射实现单例对象的拷贝.查阅了部分资料,先实现通过反射拷贝对象. 1. 编写需要被拷贝的对象Person package co ...
- CentOS下Apache+SVN+LDAP的安装与配置
上班接近4个月了,在公司做配置管理工程师,主要是在Linux下对公司的源代码以及项目发布进行管理.4个月接触了好多新知识,也对各种工具的集成使用搞得云里来雾里去的,所以打算自己搭建一套环境,进行测试. ...
- 本地主机作服务器解决AJAX跨域请求访问数据的方法
近几天学到ajax,想测试一下ajax样例,由于之前在阿里租用的服务器过期了,于是想着让本地主机既做服务器又做客户端,只是简单地测试,应该还行. 于是,下载了xampp,下载网址http://www. ...