Android
wxv111
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 · 283 阅读 · 0 评论 -
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 · 1350 阅读 · 0 评论 -
一些思考方式——从continue按钮的实现暴露的设计问题
一、功能背景用户每天会学习一些课程,我希望下次当用户再次学习的时候能够知道从哪里开始上次的学习。由于有很多的课程,通过list的方式提供给用户,用户如果自己找就会很不方便。那么就提供一个continue按钮,当点击这个按钮时就能定位到应该学习的课程的位置。二、服务器提供的数据服务器提供两个数据:在用户的信息中有一个targetId域,存放用户应该继续学习的课程id。这个targetId是optio原创 2016-04-07 23:36:21 · 573 阅读 · 0 评论 -
自定义view的measureSpec是谁的mode和size
一、简单背景介绍在自定义view(不是ViewGroup)时,需要重写父类的onMeausre(), onLayout(), onDraw():protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec);原创 2016-04-09 15:58:22 · 1399 阅读 · 0 评论 -
问题:COMPLEX_UNIT_PX
现在获取文字大小等都是通过pixel,如下textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.txt_x_small));但是在TypedValue中还有另一个filedCOMPLEX_UNIT_SP,textView.setTextSize(TypedValue.原创 2016-04-15 16:48:50 · 1336 阅读 · 0 评论 -
disable application 的notification
可以disable application 的notification! 那activity中是否能够得到呢? 应该可以,查一查原创 2016-05-12 13:10:54 · 1384 阅读 · 0 评论 -
selector of text and background should using different attributes
selector of text color:you should use android:color="@color/white" not android:color="@drawable/white"selector of background:you should use android:color="@drawable/white" not android:color="@color/w原创 2016-05-26 07:46:05 · 381 阅读 · 0 评论 -
merge中写的属性不起作用
比如写了一个自定义view,继承LinearLayout,在merge的属性部分写了orientation="vertical",但是没有作用,必须在使用的地方定义属性原创 2016-05-26 07:58:39 · 1495 阅读 · 1 评论 -
allowBackup
http://y-anz-m.blogspot.jp/2015/09/androidmanifest.htmlhttp://qiita.com/kpkpkp/items/eb49db6fa1a9f637af97原创 2016-05-26 17:22:18 · 447 阅读 · 0 评论 -
在dev环境访问self assigned的https服务器,报Trust Anchor not found for Android SSL Connection
https的SSL解决方案:try { final TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { @Override public void checkClientTrusted(java.security.cert.X50原创 2016-05-29 11:55:19 · 694 阅读 · 0 评论 -
Growthpush的push通知为什么当连在wifi的时候就不能收到
http://matome.naver.jp/odai/2142466999721107101如果一开始就是wifi或者一开始就是LTE等没有问题 但是如果相互切换的话就不行了原创 2016-05-30 20:58:30 · 638 阅读 · 0 评论 -
在导入新库的时候,一定先看下已有的依赖!
gradle dependencies原创 2016-06-02 01:28:56 · 412 阅读 · 0 评论 -
what the fragment
一、一些废话第一天参加的what the fragment,可惜技术和英文太垃圾,现场没听懂,刚刚花了2个小时在youtube复看了一遍,还是只看懂了70%。还是自己的经验不够,写的代码太少,很多问题没有遇到过,自然不能理解。大概在这里梳理一下吧。二、历史公司的项目也是用fragment,就是一个activity一个fragment的样子,感觉为什么还特意去用个fragment,activity用的原创 2016-05-23 15:28:31 · 305 阅读 · 0 评论 -
animation cancel
when calling animationSet.cancel(), onAnimationCanel() and onAnimatioEnd() are both invoked…….原创 2016-07-11 17:10:59 · 859 阅读 · 0 评论 -
Locale.US
Integer.parseInt(String) 以前有bug,Integer.parseInt(“アラビア数字“) 是不能正确的识别的。现在修正了。String.format(Locale.US, “%02d”, 数字) 如果不指定的的话,显示会交给lib内部,但是内部是怎样的并不知道,于是,为了app的统一,全部Locale指定!如果多语言对应的话,基本上显示的时候需要用Locale.get原创 2016-06-15 18:34:08 · 3134 阅读 · 0 评论 -
setBackgrounResource内部做了神马?!
问题再现: 在RecyclerView的adapter里自定义了view,给view设置了paddingBottom,同时需要根据top,middle,bottom来设置不同的item的background(shape xml)。 可是在一些device上(sony xperia)paddingBottom竟然不起作用。问题逐一排查发现是setBackgroundResource的问题! 原来原创 2016-06-17 16:02:36 · 326 阅读 · 0 评论 -
scrollview中RelativeLayout问题
scrollview中RelativeLayout需要是wrap_content。如果此时我需要在屏幕的最下面放一个buttonA,然后让另一个buttonB在这个buttonA之上,用layout_above不管用。那问题来了,为什么?还有如果有滚动条的情况出现时,那buttonA会出现在哪里??在最下面??原创 2016-03-14 17:50:21 · 659 阅读 · 0 评论 -
dimension适配
large,xhdpi, 600x960dpvalues-sw600dp-hdpi dimens.xml: 10sp values-xhdpi dimens.xml: 12spresult: 10dp原创 2016-03-14 13:37:26 · 391 阅读 · 0 评论 -
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 · 302 阅读 · 0 评论 -
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 · 5037 阅读 · 3 评论 -
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 · 17893 阅读 · 2 评论 -
Crashlytics
这周的sprint有Crashlytics的导入,看名字就是记录crash的,自己也没用过,大概查了下,目前是由twitter进行管理开发的软件,能够很好的收集crash信息。android导入也不是很麻烦,导入android studio的插件,在launchactivity的oncreate中启动,在androidmanifest中配置metadate就可以用了。当用户端发生任何的crash都会原创 2016-03-03 23:18:50 · 411 阅读 · 0 评论 -
Thread.UncaughtExceptionHandler
在android的Application的onCreate中注册Thread.UncaughtExceptionHandler,它运行在进程中,可以捕获crash异常!在这个里面写crashlytics.log原创 2016-03-16 15:47:08 · 325 阅读 · 0 评论 -
动画问题
问题 当点击back键时,需要通过3秒钟的淡入动画显示PauseDialog,也就是在3秒动画结束的时候,调用listener的onshow。问题是这个动画整个运行是在UI主线程吗?但是上次在ObjectAnimator上观察到在动画移动过程中也可以相应button的点击事件。动画最终是调用invalidate这个是向UI线程发的消息?原创 2016-03-17 17:48:54 · 291 阅读 · 0 评论 -
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 · 591 阅读 · 0 评论 -
继承view要用AppCompatXXX
保证兼容性?原创 2016-03-04 00:03:53 · 2645 阅读 · 0 评论 -
blog need to read
http://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html原创 2016-03-18 15:58:46 · 285 阅读 · 0 评论 -
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 · 406 阅读 · 0 评论 -
在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 · 2419 阅读 · 2 评论 -
ActivityLifecycleCallbacks
一、一些废话今天早上快5点的时候才睡的觉,早上不到10点起来就是研究那个Google Analytics。因为新增了一个需求就是希望记录用户的类型,需要用到其中的custom dimension.但是最新版的SDKv4的用法改变了,研究了半天怎么样设置才能正确的把用户类型和hit一起发送出去。然后想了半天怎么设计代码符合DDD。简直是闇。设计好了被mentor说不希望做一个usecase,希望放到c原创 2016-03-09 23:31:25 · 790 阅读 · 0 评论 -
wholeContainer.setMinimumHeight(wholeContainerHeight + buttonsContainerHeight);
<android.support.v4.widget.NestedScrollView> <LinearLayout android:id="@+id/whole_container"> ... ... </LinearLayout></android.support.v4.widget.NestedScrollView><Line原创 2016-04-03 01:08:49 · 524 阅读 · 0 评论 -
同时点击buttons
一、问题再现View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { Context context = getContext(); setButtonsEnabled(fals原创 2016-03-22 11:14:01 · 394 阅读 · 0 评论 -
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 · 383 阅读 · 0 评论 -
metadata
androidmanifest.xml中的东西,tools:replace原创 2016-03-11 16:26:10 · 420 阅读 · 0 评论 -
android显示音标
android里的音标是IPA(international pronunciation alphabet) 低版本的android的unicode不支持IPA, 但在4.1.2, 5.0, 6.0的机子上试了下,发现是可以正常显示的,大概已经修复了?原创 2016-07-06 00:12:53 · 798 阅读 · 0 评论
分享