自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(50)
  • 资源 (10)
  • 收藏
  • 关注

原创 Flutter WebView 小记

Flutter WebView 小记 (白屏、闪退、内存没有释放)

2023-03-13 11:20:57 627

原创 第三方 App 分享微信小程序链接

private void sendMiniApps(String articlePk, String title, String content, String url, Bitmap icon) { WXMiniProgramObject miniProgram = new WXMiniProgramObject();

2017-04-20 17:33:24 20698 6

原创 关于 Vulkan 简介 —— Android N 引入新的 3D 渲染引擎

关于 VulkanVulkan 被视作是 OpenGL 的后续产品。 它是一种多平台 API,可支持开发人员准备游戏、CAD 工具、性能基准测试等高性能图形应用。 它可在不同的操作系统(比如 Windows*、Linux* 或 Android*)上使用。 Vulkan 由科纳斯组织创建和维护。 Vulkan 与 OpenGL 之间还有其他相似之处,包括图形管道阶段、OpenGL 着色器(一

2016-08-30 11:13:48 8263

原创 后台任务的抉择

A flowchart for background work, alarms, and your Android appFor many apps, doing work in the background can be an important part of building a great experience. An alarm registered with AlarmMana

2015-09-17 13:18:41 693

原创 一种TextView插入图片的途径(图片的显示高度和文字高度一致)

实现效果:控件代码:import java.lang.ref.WeakReference;import android.content.Context;import android.graphics.Canvas;import android.graphics.Paint;import android.graphic

2015-03-03 15:43:11 1246

原创 git 批量删除分支

删除本地分支以删除所有名称包含“feature/4.0-”字段的本地分支 为例子:对应的命令:$ git branch | grep 'feature/4.0-' |xargs git branch -d删除远程分支以 删除所有名称包含“develop”字段的远程分支 为例子:直接上命令:$ git branch -r| awk -F...

2015-02-28 16:02:16 5534 1

翻译 DBFlow 学习笔记(一)

走进 DBFLOW : 高性能的 Android ORM DB 库      有许多流行的 ORM DB 库(如:Active Android,Sprinkles,GreedDAO,SugarORM),并且似乎每个库都是采用反射来实现核心的数据库交互。 然而 DBFlow 一个更高效和强大的 Android ORM DB 库。   反射带来了的风险       在 Java

2015-02-11 18:06:37 4588

原创 关于自定义 Toolbar 的学习笔记

首先看一下 Toolbar

2014-11-25 11:54:31 2095

转载 有道词典“网络已断开”的解决办法

有道词典的生词本很好用,查词的时候点一下就能加入生词本,还会根据记忆曲线按时提醒你复习,所以近来我一直在用有道词典。但是,有道词典经常会出现诡异的“网络断开”问题,在左下角显示一个小叉,提示“网络已断开”,不能登录服务器,这时不能获取单词的发音和详细解释,生词本也不能同步。为什么说诡异呢,因为这时候整个电脑的网络明明是好的,可以打开网页、上 QQ、玩网游等等,总之上各种网站都毫无问

2014-11-24 20:50:54 5011

原创 Android MD5笔记

public static final String encodeBy32BitMD5(String source) { return encrypt(source, false); } static final String encrypt(String source, boolean is16bit) { if (TextUtils.isEmpty(source)) {

2014-04-01 11:15:24 630

转载 sqlite 如何限制某个表中的数据总数

1、定期执行:DELETE FROM table where _id NOT IN (SELECT _id from table ORDER BY insertion_date DESC LIMIT 50)2、或者建立一个trigger:CREATE TRIGGER delete_till_50 INSERT ON _table WHEN (select count

2014-02-28 15:11:09 6789

转载 Sqlite 学习笔记(一)

SQLite清空表并将自增列归零SQL标准中有TRUNCATE TABLE语句,用来清空表的所有内容。但SQLite不支持这个语句。在SQLite中直接使用 DELETE FROM TableName 就可以了。对于大多数DBMS来说,用DELETE不如用TRUNCATE 速度快,因为TRUNCATE 不用访问整个表,不用记录数据的变动。SQLite虽然不支持TRUNCATE,但它对DE

2014-02-28 10:49:51 850

翻译 《The Custom Permission Problem》部分译文

自定义用户权限问题从一开始Android便提供了系统权限(由原生框架定义)和用户自定义权限(由应用定义).不幸的是,自定义权限有一些“无证的局限性”使得它们存在内在的风险.特别地,自定义权限可能被任何人,任何时间,被定义,而且“先定义的权限为王”(原文:“first one in wins”),这些可能引发一些意外的行为.在这里,我们将介绍一些场景并展示一些可能

2014-02-14 12:30:46 736

原创 一种实现视差效果的思路

private void onScrollChanged(int top) { if(scrollTop == top){ return; } scrollTop = top; //srollview当前显示高度 int scrollViewHeight = getHeight();

2014-01-17 17:17:06 1589

转载 eclipse实用插件

eclipse 4.2 安装历程笔记发表于2013/01/08由juluren eclipse 3.6 一直用的好好的也就懒的升到新版,这儿天因为 google app engine 的 eclipse plugin 在 3.6 上面一直升级不上去(因为G社提供套件的网站少提供儿个jar档导致这问题),想说…好吧…该来的还是来了,就不要撑了,改装 4.2 吧。所以就生了这篇 eclip

2013-12-27 11:00:01 910

原创 Quickly-Return实现思路小结

Quickly-Return实现思路小结:1、通过View.getViewTreeObserver().addOnGlobalLayoutListener()的回调方法onGlobalLayout()计算出ListView每个Item项的高度和ListView“全部显示时”的高度;1.1、“全部显示时”即:public void computeScrollY() {mHeigh

2013-11-24 11:54:03 1088

原创 Rebound - Spring Animations for Android 小结

1、综述Rebound 通过胡克定律,实现的一个类似“弹簧”动画效果的第三方工具包。项目来源:http://facebook.github.io/rebound/2、应用及简析Rebound主要提供了SpringSystem和Spring两个类,可用来实现动画;可以通过设置Spring的SpringConfig控制摩擦力(friction)、张力(tension),来控

2013-11-14 17:26:10 3832

原创 °和℃

℃ :℃°   :°参考:http://unicode.org/reports/tr20/#Unicode和http://www.fileformat.info/info/unicode/block/index.htm

2013-11-04 14:40:00 1143

原创 context.getAssets().openNonAssetFd

可以根据"如res/drawable-mdpi/icon.png"相对的地址来直接读取drawable下面的文件:AssetManager mAssets = context.getAssets();FileInputStream in = null;try { //name 就是上面所说的 得到的那个值, 如res/drawable-mdpi/icon.png

2013-10-22 15:20:00 4848

原创 关于自定义MenuItem导致的IllegalArgumentException

问题诱因:使用如下代码更改MenuItem字体: SpannableString spannableTitle = new SpannableString(itemTitle); if(i==0){ spannableTitle.setSpan(new ForegroundColorSpan(Color.RED), 0, spannableTitle.

2013-10-21 15:12:42 1487

转载 下载android代码过程中,提示以下错误: error: Failed connect to android.googlesource.com:443;

下载android代码过程中,提示以下错误:error: Failed connect to android.googlesource.com:443;Connection refused while accessinghttps://android.googlesource.com/a/platform/frameworks/base/info/refsfatal: HTTP r

2013-10-18 10:08:41 6914

转载 关于ADB server didn't ACK的问题

问题描述:不论是使用eclipse重启adb,还是使用adb start-server,均提示ADB server didn't ACK解决方案:(查看是否5037端口被占用)先在命令行中输入如下指令,查看5037这个端口现在是被谁占用了:netstat -a -o 5037那这个4792在我机器上,到底是个什么进程呢,好的,接着输入以下

2013-09-29 10:48:40 701

转载 Android SDK Manager 无法更新

1、问题:最近在用android sdk manager 更新sdk的时候 发现无法更新了 Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: No route to host解决方案:打开C:\WINDOWS\system32\drive

2013-09-28 15:05:15 967

原创 Chrome 无法打开12306 解决方案

参考:http://bbs.csdn.net/topics/380149530解决方法:1,在地址栏中直接打开地址: https://dynamic.12306.cn/otsweb/2,选择“仍然继续”3,再重新打开 http://www.12306.cn ,就可以正常访问了!

2013-09-28 14:29:33 1921

转载 TortoiseGit的密钥

TortoiseGit的密钥我认为TortoiseGit最大的问题,就是在于它使用ppk密钥格式,而不是使用OpenSSH密钥格式。因为linux系统是默认使用OpenSSH的,所以Git在基于命令行的时候是使用OpenSSH格式的密钥。同理,gitolite这种服务器端程序使用的是OpenSSH格式的密钥。所以,必须将原有的OpenSSH密钥转换成PPK密钥才能在Tortoi

2013-09-27 18:59:16 1617

转载 Windows下Git配置与安装

http://blog.csdn.net/jiguanghoverli/article/details/7902791Windows 系统下Git安装图解简单来说Git是一个免费的、开源的版本控制软件,从功能上讲,跟我们比较熟悉的Subversion(SVN)这类版本控制软件没什么两样。由于工作的需求,需要在WinXP下安装git配合团队完成相应的工作,以前一直在别

2013-09-27 18:13:25 795

转载 Git 官网学习地址(可能需要穿过GFW)

BookThe entire Pro Git book, written by Scott Chacon and published by Apress, is available here. All content is licensed under the Creative Commons Attribution Non Commercial Share Alike 3.0 l

2013-09-27 17:06:11 1215

原创 Collections.sort升序和降序笔记

Collections.sort(positionArray, new Comparator() {@Overridepublic int compare(Integer lhs, Integer rhs) {//降序if(lhs > rhs){return -1;}else if(lhs return 1;}else{return 0;

2013-08-15 17:49:31 13325

转载 Andorid 4.3 Show CPU usage

On-screen GPU profilingAndroid 4.3 adds new developer options to help you analyze your app’s performance and pinpoint rendering issues on any device or emulator.In the Profile GPU renderin

2013-08-01 11:58:42 1292

原创 关于“调用finish() 对应的activity却不调用onDestroy”的体会

1、最大的可能是activity的引用被一个静态或全局类对象持有,因此导致activity无法被销毁;2、几种需要注意的细节:(1) getApplicationContext()和getBaseContext()(2) 将一个 implements Interface 的activity 作为回调set 给一个静态或全局类对象,记得在finish()之前要释放activity3、

2013-07-30 11:01:54 4024

原创 Android 各版本的 support vx包相关笔记

1、更新记录:https://developer.android.com/tools/extras/support-library.html#Downloading2、各个版本的归档:https://github.com/mastro/android-support-library-archive

2013-07-22 15:57:28 1100

转载 Layout Inflation As Intended

Layout inflation is the term used within the context of Android to indicate when an XML layout resource is parsed and converted into a hierarchy of View objects.It’s common practice in the Android SDK

2013-07-09 23:33:46 1331

转载 内部Handler类引起内存泄露

如果您在Activity中定义了一个内部Handler类,如下代码:public class MainActivity extends Activity { private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) {

2013-07-01 09:42:19 638

原创 一种简单的自定义Progress

<rotate android:fromDegrees="0" android:interpolator="@anim/linear_interpolator" android:pivotX="50%" android:pivotY="50%" android:toDegrees

2013-05-23 11:14:36 631

原创 自定义 DialogPreference 代碼備份

import android.app.AlertDialog.Builder;import android.content.Context;import android.content.DialogInterface;import android.content.SharedPreferences;import android.preference.DialogPreference;im

2013-05-07 10:24:40 1600

原创 设置eclipse自动生成的author等注释

1、window-${filecomment}${package_declaration}/*** @author myname* @version 创建时间:${date} ${time}* 类说明*/${typecomment}${type_declaration}2、在eclipse的eclipse.ini文件中加入-Duser.name=My

2013-05-06 15:51:53 642

原创 关于FragmentStatePagerAdapter状态保存引发的IllegalStateException

异常描述:IllegalStateException: is not currently in the Fragme解决方案:重载FragmentStatePagerAdapter的saveState()和restoreState(Parcelable state, ClassLoader loader),不再调用super.saveState()和super.restoreStat

2013-04-26 11:40:31 2888

转载 Java Feture 简介

在Java中,如果需要设定代码执行的最长时间,即超时,可以用Java线程池ExecutorService类配合Future接口来实现。 Future接口是Java标准API的一部分,在java.util.concurrent包中。Future接口是Java线程Future模式的实 现,可以来进行异步计算。Future模式可以这样来描述:我有一个任务,提交给了Future,Future替我完

2013-04-10 15:35:00 971

原创 ListView adapter中的Data也要在主线程更改否则报错如下:

04-09 15:38:04.461: W/System.err(5063): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is no

2013-04-09 15:33:21 846

转载 Android初级开发知识点归纳

一、Android 系统的架构从底层往上层主要包含: 1. Linux Kernel:Android 基于 Linux 2.6 提供核心系统服务,例如:安全、内存管理、进程 管理、网络堆栈、驱动模型。Linux Kernel 也作为硬件和软件之间的抽象层,它隐藏具 体硬件细节而为上层提供统一的服务。 2. Android Runtime:Android 包含一个核心库的集合,提

2013-03-19 17:02:30 1162

DART & Henson 3_ design document

最新 Dart&Henson; 3 版本的整体设计框架思路的文档 该版本为英文官方原版

2018-07-02

Android-Orm-sqlite-example

This directory contains example classes for use with ORMLite on the Android OS. For more information about ORMLite http://ormlite.com/android/examples/

2013-08-06

photoup-source-2.0.1-master

photup is an application, currently available on Google Play with an average rating of 4.4 (at time of writing). Due to lack of time, I'm open sourcing this so anyone can look at the code, and more importantly, so you can submit patches and keep it alive.

2013-07-22

photoup-source-2.0.1

photup is an application, currently available on Google Play with an average rating of 4.4 (at time of writing). Due to lack of time, I'm open sourcing this so anyone can look at the code, and more importantly, so you can submit patches and keep it alive.

2013-07-22

android-support-revision-13

android-support-revision-13 具体描述: https://developer.android.com/tools/extras/support-library.html#Downloading

2013-07-22

android.support-revision-11

android.support-revision-11 具体描述:https://developer.android.com/tools/extras/support-library.html#Downloading

2013-07-22

ListViewAnimation

ListViewAnimations 大全 ,有兴趣的可以看一下,来源于github

2013-07-07

google-http-java-client-1.13.1-beta

此资源包由google官方最新提供,若无积分也可到google code自行下载 基本涵盖了所有Android网络访问的工具类

2013-01-29

jd-gui-0.3.5(windows+linux)

目前最新版本的jd-gui,包含windows和linux两个平台的版本

2013-01-09

SlidingMenu源码及例子

此资源主要来自github的SlidingMenu开源项目,唯一不同的可能是本人已经完善了某些工作,可以直接导入eclipse使用了,不想付分下载的话也可以自己去github下载。

2012-12-26

空空如也

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

TA关注的人

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