Learning Android ActionBar
PART1:Make Android2.1 Support ActionBar
Last evening I learnt how to make android2.1 support actionbar from Android Developers.The page is HERE,Click.
To sum up , I briefy illustrate the main steps:
1.Add the v7 appcompat library , which is not just a jar file but a library with resources.
2.Let the Activities that originally extending "Activity" to extend "ActionBarActivity".
3.In your manifest file, update either the <application>
element or individual <activity>
elements to use one of the Theme.AppCompat
themes. For example:
That's it.
BTW,if you wanna know what the Theme.AppCompat themes contain, "Alt + /" is not capable , you can find them also on Android Developers,
Thme.AppCompat.For example, you find
public static int Theme_AppCompat_Light_DarkActionBar,
then you should change the theme like this:
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
keep in mind that the first letter in each word should be its upper class form.
PART2:Adding Action Buttons
Android Developers says the most important buttons should be set on the ActionBar, buttons that are not so important should be placed in the Overflow Button.
------Met a Problem----
After adding a key-value pair in strings.xml file, MainActivity.java pointed out that R.java can't be found.So open "gen" folder,sure enough R.java is missing.Checking the xml file,I found in <string name="action_search">Search!!</string>, the "s" in the string was written as a upper class form.change it back to lower, R.java returned.Problem solved.
------------------------
Learning Android ActionBar的更多相关文章
- [Xamarin.Android] ActionBar Tips
[Xamarin.Android] ActionBar Tips ActionBar用途 快速搞懂 ActionBar的用途,可以参考下列文章: [Android]使用 ActionBarCompat ...
- Android ActionBar详解
Android ActionBar详解 分类: Android2014-04-30 15:23 1094人阅读 评论(0) 收藏 举报 androidActionBar 目录(?)[+] 第4 ...
- Android ActionBar(转)
本文内容 关于 ActionBar 必要条件 项目结构 环境 演示一:Action Bar 显示隐藏 演示二:Action Item 显示菜单选项 演示三:Action Home 启用“返回/向上”程 ...
- Android ActionBar应用实战,高仿微信主界面的设计
转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/26365683 经过前面两篇文章的学习,我想大家对ActionBar都已经有一个相对 ...
- Android ActionBar完全解析,使用官方推荐的最佳导航栏(下) .
转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/25466665 本篇文章主要内容来自于Android Doc,我翻译之后又做了些加工 ...
- Android ActionBar完全解析,使用官方推荐的最佳导航栏(上)
转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/18234477 本篇文章主要内容来自于Android Doc,我翻译之后又做了些加工 ...
- Android ActionBar全然解析,使用官方推荐的最佳导航栏(上)
转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/18234477 本篇文章主要内容来自于Android Doc.我翻译之后又做了些加工 ...
- Android 原生 Android ActionBar
本文内容 关于 ActionBar 必要条件 项目结构 环境 演示一:Action Bar 显示隐藏 演示二:Action Item 显示菜单选项 演示三:Action Home 启用"返回 ...
- Android Actionbar Tab 导航模式
Android Actionbar Tab 下图中,红色矩形圈起来的就是我们 ActionBar Tab,下面我们将一步一步的实现下图中的效果. 初次尝试 package com.example.it ...
随机推荐
- 【Navicat preminm】64位的Navicat preminm注册
百度云盘 技术-->Navicat preminm+破解
- iOS开发 Coretext基本用法
转至 http://blog.csdn.net/fengsh998/article/details/8691823 API接口文档. https://developer.apple.com/libra ...
- 第五讲_图像识别之图像检测Image Detection
第五讲_图像识别之图像检测Image Detection 目录 物体检测 ILSVRC竞赛200类(每个图片多个标签):输出类别+Bounding Box(x,y,w,h) PASCAL VOC 20 ...
- 已迁移到http://www.coffin5257.com
点我直达
- java 定义一个同步map内存去重法
实例:
- MacOS 修改主机名
修改主机名 sudo scutil --set HostName xxx 修改共享名 sudo scutil --set ComputerName xxx
- 基于EfCore的一个多租户Demo
六月份如愿的转入了架构组,先上手搞了个CI服务器,把架构组的几个项目撸到上面去了.效果不错,接着就把其他两个项目组有单元测试的项目撸上去了,在桌子上放了个显示器当大屏用. 因为公司准备进行一个大的系统 ...
- 【转】Android IDA 动态调试最完善攻略,跨过各种坑
前提条件和运行环境一定要写清楚,不然会有很多坑,坑死人. (1)IDA 是最新的7.0版本 (2) JDB 使用Java安装目录下的 (3)系统是win10 使用命令窗口时有很大的差别 (4)手机是 ...
- SQL创建触发器
更新: CREATE TRIGGER `r_users_1` AFTER UPDATE ON `users` FOR EACH ROW update `wxusers` set status=NEW. ...
- 导入EXCEL 时间数据为小数 问题
同事在做将EXCEL导入数据库功能时发现一个奇怪的问题:在EXCEL中,有一列数据明明呈现出时间格式,比如:18:35,但导到数据库中,居然一串长长的小数:0.7743055555555556,我靠, ...