自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

工作生活的memo

学到的东西简单的做个备忘

  • 博客(22)
  • 资源 (1)
  • 收藏
  • 关注

原创 mac上同时安装多个jdk,选择版本

在home文件夹下的.bash_profile中设置JAVA_HOME> open .bash_profileexport JAVA_HOME=`/usr/libexec/java_home -v 1.7`> source .bash_profile (for update)就能把jdk从1.8变成1.7了

2016-03-28 19:04:31 1814

原创 multidex导入至build失败问题

Error:Execution failed for task ‘:app:transformClassesWithDexForDevDebug’. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.int

2016-03-25 17:58:42 1281

原创 linearlayout问题

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_pare

2016-03-22 18:25:18 302

原创 同时点击buttons

一、问题再现View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { Context context = getContext(); setButtonsEnabled(fals

2016-03-22 11:14:01 327

原创 unaligned apk

http://stackoverflow.com/questions/22058210/why-unaligned-apk-is-needed http://developer.android.com/intl/ja/tools/publishing/app-signing.html

2016-03-18 16:00:53 358

原创 blog need to read

http://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html

2016-03-18 15:58:46 250

原创 动画问题

问题 当点击back键时,需要通过3秒钟的淡入动画显示PauseDialog,也就是在3秒动画结束的时候,调用listener的onshow。问题是这个动画整个运行是在UI主线程吗?但是上次在ObjectAnimator上观察到在动画移动过程中也可以相应button的点击事件。动画最终是调用invalidate这个是向UI线程发的消息?

2016-03-17 17:48:54 254

原创 Thread.UncaughtExceptionHandler

在android的Application的onCreate中注册Thread.UncaughtExceptionHandler,它运行在进程中,可以捕获crash异常!在这个里面写crashlytics.log

2016-03-16 15:47:08 271

原创 View的位置--x,y,translationX,translationY

一、背景在上一篇文章View的位置中,介绍了top, left, bottom, right这几个坐标,我们知道了这几个坐标是view与其所在的父容器的相对位置。那x,y,translationX,translationY是做什么的?这几个坐标是在Android API 11(Android3.0)之后加进来的。三、代码还是之前的那个例子<RelativeLayout xmlns:android="

2016-03-15 23:55:58 17737 2

原创 View的位置--top, left, bottom, right

一、背景在用到view的位置时,查到的API有一大堆,什么 getTop(),getTranslationX(), getX(),不知道这些位置具体代表的是什么东西。于是今天就先研究下top, left, bottom, right这几个坐标。二、坐标Android的坐标系的x轴向下是正方向,y轴向右是正方向。top, left, bottom, right这几个属性是View类就具有的,顾名思义就

2016-03-15 22:28:06 4722 3

原创 scrollview中RelativeLayout问题

scrollview中RelativeLayout需要是wrap_content。如果此时我需要在屏幕的最下面放一个buttonA,然后让另一个buttonB在这个buttonA之上,用layout_above不管用。那问题来了,为什么?还有如果有滚动条的情况出现时,那buttonA会出现在哪里??在最下面??

2016-03-14 17:50:21 597

原创 dimension适配

large,xhdpi, 600x960dpvalues-sw600dp-hdpi dimens.xml: 10sp values-xhdpi dimens.xml: 12spresult: 10dp

2016-03-14 13:37:26 343

原创 adb shell commands

这篇官方文档都没有index了,我的妈,赶快看! http://developer.android.com/intl/ja/tools/help/shell.html http://developer.android.com/intl/ja/tools/help/adb.html

2016-03-11 16:29:06 258

原创 metadata

androidmanifest.xml中的东西,tools:replace

2016-03-11 16:26:10 279

原创 ActivityLifecycleCallbacks

一、一些废话今天早上快5点的时候才睡的觉,早上不到10点起来就是研究那个Google Analytics。因为新增了一个需求就是希望记录用户的类型,需要用到其中的custom dimension.但是最新版的SDKv4的用法改变了,研究了半天怎么样设置才能正确的把用户类型和hit一起发送出去。然后想了半天怎么设计代码符合DDD。简直是闇。设计好了被mentor说不希望做一个usecase,希望放到c

2016-03-09 23:31:25 735

原创 在Application的onCreate中创建线程,线程不能被执行

问题: 在Application的onCreate中调用了ExecutorService service = Executors.newSingleThreadExecutor();service.commit(new Runnable() {@Override public void run() { Log.e("GA", "reloa

2016-03-09 01:05:17 2312 2

原创 Fragment的IllegalStateException

背景问题:java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1341) at android.su

2016-03-07 00:35:08 528

原创 继承view要用AppCompatXXX

保证兼容性?

2016-03-04 00:03:53 2564

原创 需要思考的一些问题列表

为什么要用Dagger2?为了使测试方便,Mock容易,还有没有其他?开发中所用的singletonDDD一些实战Jenkins,docker能够做些什么?Google IO 2008-2016首要任务是要考虑 事物的本质感觉人生学习实际就是不断在用持续增量的方式来完善自己的domain。重点在于完善!

2016-03-03 23:27:57 246

原创 Crashlytics

这周的sprint有Crashlytics的导入,看名字就是记录crash的,自己也没用过,大概查了下,目前是由twitter进行管理开发的软件,能够很好的收集crash信息。android导入也不是很麻烦,导入android studio的插件,在launchactivity的oncreate中启动,在androidmanifest中配置metadate就可以用了。当用户端发生任何的crash都会

2016-03-03 23:18:50 340

原创 ResourcesUtil. getIdentifier

A way to get resources id with good performance.Not in good performance: http://developer.android.com/intl/ja/reference/android/content/res/Resources.html#getIdentifier(java.lang.String,%20java.lang.S

2016-03-02 13:32:43 302

原创 android memo--keystore

When develop in a team, you maybe encounter with this problem. Everytime I have to uninstall apk and then I can install the new apk. It’s because of the different keystore. Everyone who installs the ap

2016-03-02 13:26:19 246

VC++MFC实现凸包绘制

用VC++MFC实现凸包绘制,算法精简易懂!

2009-11-07

空空如也

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

TA关注的人

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