Android ---------- Android Bar Bug 总结
1 怎样设置 ActionBar的Tab 的颜色?
// 设置actionBar的颜色
Drawable draw = new ColorDrawable(Color.GREEN);
actionBar.setBackgroundDrawable(draw);
draw = new ColorDrawable(Color.GREEN);
// set Tab color
actionBar.setStackedBackgroundDrawable(draw);
2 怎样设置 ActionBar的字体居中?
自己定义 view!
// 设置自己定义显示: 居中字体:
actionBar.setDisplayShowCustomEnabled(true);
actionBar.setCustomView(R.layout.actionbar_coustom_menu);
布局文件:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="商城"
/>
</FrameLayout>
3 // 不显示 title
actionBar.setDisplayShowTitleEnabled(false);
、
4 加入 ListView item
OK
5 10-12 16:45:06.501: E/AndroidRuntime(18541): java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
解决方式:
最后一个參数 改动为: null
convertView = View.inflate(context, R.layout.fragment_shop_listview_item, null);
Android ---------- Android Bar Bug 总结的更多相关文章
- Android Action Bar简介
Android Action Bar简介 Design: Action Bar Action Bar是在屏幕顶端的一部分内容,通常在整个app进行中都保持存在. 它提供了几个关键的功能: 1.使得重要 ...
- android process bar 几种style
process bar 圆形style记录 1. style="?android:attr/progressBarStyleSmall" //根据主题变颜色 2. holo 主题下 ...
- Android UI开发神兵利器之Android Action Bar Style Generator
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/x359981514/article/details/26283129 ActionBar是3.0后的 ...
- python for android : BeautifulSoup 有 bug
BeautifulSoup 善于网页数据分析 .可是 python for android : BeautifulSoup 有 bug , text = h4.a.text 仅仅能取得 None,因此 ...
- Android BroadcastAnyWhere(Google Bug 17356824)漏洞具体分析
Android BroadcastAnyWhere(Google Bug 17356824)漏洞具体分析 作者:简行(又名 低端码农) 继上次Android的LaunchAnyWhere组件安全漏洞后 ...
- Android LaunchAnyWhere (Google Bug 7699048)漏洞具体解释及防御措施
開始 近日,Google修复一个组件安全的漏洞LaunchAnyWhere(Google Bug 7699048). 这个漏洞属于Intend Based提取漏洞,攻击者利用这个漏洞,能够突破了应用间 ...
- Android UI法宝的发展Android Action Bar Style Generator
ActionBar它是3.0经UI设计规格.同时它是Google设计风格强烈推荐,如何做一个高速设计的眼睛ActionBar之.进一步,我们设置了阶段为一个入眼ActionBar模板吧,然后,Andr ...
- 图解Android - Android GUI 系统 (1) - 概论
Android的GUI系统是Android最重要也最复杂的系统之一.它包括以下部分: 窗口和图形系统 - Window and View Manager System. 显示合成系统 - Surfac ...
- 图解Android - Android GUI 系统 (2) - 窗口管理 (View, Canvas, Window Manager)
Android 的窗口管理系统 (View, Canvas, WindowManager) 在图解Android - Zygote 和 System Server 启动分析一 文里,我们已经知道And ...
随机推荐
- poj 1087 A Plug for UNIX(字符串编号建图)
A Plug for UNIX Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14862 Accepted: 5026 ...
- Swift之 vm10虚拟机安装Mac OS X10.10教程
VM10装Mac OS X 10.9.3及更新到Mac OS X 10.10,让你的windows也能玩Swift . 近期WWDC放出终极大招--新的编程语言Swift(雨燕),导致一大波程序猿 ...
- pat(A) 1065. A+B and C (64bit) (java大数)
代码: import java.util.*; import java.math.*; public class Main { public static void main(String args[ ...
- Linq查询案例
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- Linux下MySQL允许远程连接以及授权命令
--针对某个库做授权 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; ...
- 深入理解Android(4)——理解Android中的JNI(下)
在前面文章中简单介绍了JNI,这一篇文章来简单看一下jni.h中定义的一些常用方法,来实现通过C++调用Android中的Java代码. 转载请说明出处:http://blog.csdn.net/da ...
- 12、UVC&V4L2的关系
UVC是一种usb视频设备驱动.用来支持usb视频设备,凡是usb接口的摄像头都能够支持 V4L2是Linux下的视频采集框架.用来统一接口,向应用层提供API UVC: USB video clas ...
- 【习题 8-8 UVA - 1612】Guess
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] double千万不要用==判断相等... 而且两个保留2位有效数字的数字x,y 判断它们相等应该这样. int temp1 = ro ...
- 【hihocoder 1369】网络流一·Ford-Fulkerson算法
[Link]:http://hihocoder.com/problemset/problem/1369 [Description] [Solution] 最大流模板题 [NumberOf WA] [R ...
- LightOJ 1291 Real Life Traffic
Real Life Traffic Time Limit: 2000ms Memory Limit: 32768KB This problem will be judged on LightOJ. O ...