自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 资源 (5)
  • 收藏
  • 关注

转载 Context的注意事项(笔记)

这篇博客是笔记记录,是写给我自己看的。大家想了解具体的,请点击张鸿洋。 Context是一个抽象类,Activity、Service、Application都是Context的子类。项目中Activity的Context和Application的Context是不一样的,不能随意使用。Activity的Context的生命周期和Activity是一样的,Activity销毁后Context也销毁

2017-10-31 20:19:03 791

原创 视频录制(一)—mediaRecorder介绍

mediaRecorder类的详细说明

2017-06-23 14:51:05 1739 1

转载 视频大小计算

先上计算公式,后面再详细解释 (补充说明:文件大小单位KB) 编码率,就是比特率,单位kbps,其中: 1. b 为 比特(bit) 就是电脑文件大小的计量单位, 2. p 为 每(per) , 3. s 为 秒(second) 4. 1KB=8Kb,区分大小写,B代表字节(Byte) 1MB=8Mb=1024KB=8192Kb 完整的视频文件是由音频流与视频流2个部分组成的

2017-06-22 18:35:29 17288

原创 The SDK platform-tools version(24) is too old to check APIs compiled with API 25

在实际开发中,我们有时候会遇到红色的warning: The SDK platform-tools version(24) is too old to check APIs compiled with API 25 直白点,就是说platform-tools version (24) 小于 compileSdkVersion (25)自然而然,我们就知道怎么解决了嘛,有两种方法: 1. 去S

2017-06-22 17:58:23 4865

原创 Android Exception总结

1. ConnectivityService: Neither user 10099 nor current process has android.permission.ACCESS_NETWORK_ST解决方案: <uses-permission android:name="android.permission.xxx"/>的位置有问题,应该放在<application>标签的外面。

2016-01-23 16:56:40 588

原创 List 操作容易出现的bug

一、 没有完全删除想要删除的数据描述:使用for循环删除list中的想要删除的数据,结果没有删除全部的数据public class ListExample { public static void main(String[] args) { List<String> list = new ArrayList<>(); list.add("a");

2016-01-12 19:43:22 537

原创 App Indexing

什么是App Indexing?将网站上的网页和智能手机相关联。已安装了相应软件的用户可以通过网站直接打开应用内容。详细信息请参见官网https://developers.google.com/app-indexing/webmasters/app官网上写的非常详细,可以看中文的。代码实现HTML网页中要提供App Indexing的网址是http://example.

2015-08-28 17:39:29 2736

原创 AlertDialog宽度设置

方法很简单,直接上代码。mAlertDialog.show();WindowManager.LayoutParams params = mAlertDialog.getWindow().getAttributes();params.width = 100;mAlertDialog.getWindow().setAttributes(params);需要注意的是:必须在dialog.s

2015-08-28 15:57:32 717

原创 NumberPicker循环滚动

使用setWrapSelectorWheel(boolean wrapSelectorWheel) 设置是否循环滚动。而且必须在setMaxValue()和setMinValue() 的后面调用setWrapSelectorWheel() 才管用。

2015-08-27 16:51:39 4911

原创 EditText的光标不显示

点击EditView,EditView获取焦点后,有可能光标不显示,也有可能光标不闪烁。点击多次后,光标才正常显示。

2015-08-27 15:28:36 2586

原创 获取自定义Calendar中的数据

获取自定义Calendar的数据

2015-08-27 14:04:35 1192

原创 语音输入

语音输入

2015-08-26 16:59:03 980

转载 集合的基础知识

* Collection *  |--List:元素是有序的,元素可以重复。因为该集合体系有索引。 *  |--ArrayList:底层的数据结构使用的是数组结构。特点:查询速度很快,但是增删稍慢。线程不同步。 *  ArrayList()构造一个初始容量为10的空列表。 *  |--LinkedList:底层使用的是链表结构。特点:增删速度很快,查询稍慢。

2015-08-24 22:06:36 513

原创 StringBuffer和StringBuilder

StringBuffer和StringBuild的比较和使用方法。

2015-08-24 20:39:27 407

原创 异步获取网络图片Bitmap

从网路获取图片,使用AsyncTask异步通信。异步代码如下: public void addTask(String url) { new AsyncTask() { @Override protected Bitmap doInBackground(String... params) {

2015-08-20 14:18:53 2319

原创 java.util.ConcurrentModificationException

ConcurrentModificationException异常Log: Exception in thread "main" java.util.ConcurrentModificationException产生异常的代码:ArrayList al = new ArrayList();

2015-08-13 20:58:57 416

原创 Syntax error on token "enum", interface expected

SeasonEnum.java中public class SeasonEnum {    public enum Features {    }}如果上诉代码报错:enum cannot be resolved to a type,表示系统不识别enum。J2SE1.5新增了enum关键字,用于定义枚举类。所以只有在jdk1.5及以后,enum才能使用。

2015-02-25 16:24:48 8260 2

原创 android:singleLine="true",[...]没有全部显示,只显示一个点[.]

现象描述:android:singleLine="true"时,text超出部分显示[.],没有显示省略号[...]。如果想要一行显示文本,超出部分用省略号代替。一般会使用android:singleLine="true"。这种解决办法大部分情况是对的,但是某些情况下会出问题。比如,以下情况:Button设置android:singleLine="true",text是英文的情

2015-02-12 16:35:43 3175

转载 Android开发之onSaveInstanceState和onRestoreInstanceState详解

这篇博客讲述了onSaveInstanceState和onRestoreInstanceState的作用和调用的时机,还附加源码,非常详细。推荐给大家。http://www.cnblogs.com/hanyonglu/archive/2012/03/28/2420515.html另补充说明: Activity被系统杀死后再重建时被调用.  例如:屏幕方向改变时,Activity

2014-11-26 10:48:46 606

原创 Android 打开pdf文档,没有阅读器链接到Google Play Store等下载

File file = new File(mListData.get(position).get("pdfPath").toString());                Intent intent = new Intent("android.intent.action.VIEW");                intent.addCategory("android.intent.

2014-11-24 19:17:24 1839

原创 Android market:// 链接到Google Play 商店

Intent intent= new Intent(Intent.ACTION_VIEW);                    intent.setData(Uri.parse("market://search?q=PDF"));                    startActivity(marketIntent);http://moto0421.iteye.c

2014-11-24 18:38:45 13928

原创 Bundle 保存各类型数据的总结

1.  保存Bundle.putBoolean(String key,boolean value)

2014-11-23 00:13:42 3867

原创 Eclipse “this compilation unit is not on the build path of a java project”

如果从git上下载的android 工程,import  -> git ->

2014-11-21 16:55:16 2437

原创 Replace "-" with an "en dash" character (–, &&;#8211;) ?

Eclipse中warning Replace "-" with an "en dash" character (–, –) ?

2014-11-14 16:55:52 2375

原创 动态输入String改变TextView的颜色(String转换成Color)

Parse the color string, and return the corresponding color-int. If the string cannot be parsed, throws an IllegalArgumentException exception. Supported formats are: #RRGGBB #AARRGGBB 'red', 'blue', 'g

2014-11-06 14:33:04 6095

转载 exported receiver does not require permission

在AndroidManifest.xml中使用https://www.jpush.cn/qa/?qa=974/exported-receiver-does-not-require-permission

2014-11-04 16:45:25 1656

原创 android横竖屏切换的生命周期和调用方法

http://wangxiaalwy.blog.163.com/blog/static/155250818201211210252990/

2014-10-11 11:09:08 766

原创 android-support-v7-appcompat\res\values-v14\styles_base.xml:24:错误

导入的方法参考:http://blog.csdn.net/jiangwei0910410003/article/details/17039683android-support-v7-appcompat\res\values-v14\styles_base.xml:24: error: Error retrieving parent for item: No resource found

2014-08-07 08:19:08 3742 3

转载 Andriod中绘(画)图----Canvas的使用详解

1  Bitmap,可以来自资源/文件,也可以在程序中创建,实际上的功能相当于图片的存储空间;       2  Canvas,紧密与Bitmap联系,把Bitmap比喻内容的话,那么Canvas就是提供了众多方法操作Bitamp的平台;       3  Paint,与Canvas紧密联系,是"画板"上的笔刷工具,也用于设置View控件上的样式;       4  Dra

2014-01-09 16:47:53 3024

原创 多点手势识别GestureDetector

// 手指触碰到屏幕,由一个 ACTION_DOWN触发        booleanonDown(MultiMotionEvent e);        // 确定一个press事件,强调手指按下的一段时间(TAP_TIMEOUT)内,手指未曾移动或抬起        voidonShowPress(MultiMotionEvent e);        

2014-01-09 09:59:19 970

原创 日历代码的完整版

var d = new Date();//获取系统时间,如果是10月份,month为9    var year = d.getFullYear();    var month = d.getMonth();    var date = d.getDate();//判断是否是闰年var isLeapYear = function(year1) {var f = new

2013-11-07 11:49:05 1804

转载 IE(IE6/IE7/IE8)支持HTML5标签

让IE(ie6/ie7/ie8)支持HTML5元素,我们需要在HTML头部添加以下JavaScript,这是一个简单的document.createElement声明,利用条件注释针对IE来调用这个js文件。Opera,FireFox等其他非IE浏览器就会忽视这段代码,也不会存在http请求。  方式一:引用google的html5.js文件,代码内容可以自己下载下来看。   

2013-11-06 13:31:17 827

转载 js中, opener,self,parent 区别

转自http://blog.sina.com.cn/s/blog_6b1ab3be0100pzn7.html

2013-11-05 08:05:34 667

动态输入String改变TextView的颜色(String转换成Color)

EditText手动输入字符串“#FFFFFF”等,改变TextView字体的颜色。将String转换成Color。 博客中有讲解(带图片)

2014-11-06

BaiduMapActivity

android开发百度地图的实例。api key ,请自己申请。 解决了Error inflating class com.baidu.mapapi.map.MapView问题。

2014-03-26

Opera_Mobile

Opera Mobile的一大特色就是在手机端完美再现PC端般的页面浏览体验。适用于手机端Web开发。

2013-10-22

IE-10-WINDOW

最新的IE浏览器IE10,适用系统:window

2013-10-22

Notepad++ 6.3.2Installer.exe

最新的Notepad++编辑工具。 Notepad++ 是一款Windows环境下免费开源的代码编辑器。支持27中编程语言,适合新手学习编程语言时使用,支持多达27种语言, 所见即所得功能、语法高亮、字词自动完成功能,支持同时编辑多重文档;支持自定义语言。

2013-05-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除