Android R 模拟器调用第三方应用的Activity会奔溃,在Manifast中已配置且exported=true的情况下。
测试Android 6.0和Android 10.0均无报错。目前没找到问题原因。
have you declared this activity in your AndroidManifest.xml
android 异性屏获取屏幕高度错误
context.getResources().getDisplayMetrics() 获取值为2277实际屏幕像素为1080x2400
解决办法获取DecorView的高度
((Activity) context).getWindow().getDecorView().getMeasuredHeight()
Android 6.0 canvas 绘图bug
在onDraw()方法中,给canvas添加Matrix造成位置偏移的bug
测试机型7.0 7.1 9.0均正常显示,两台6.0机器显示异常 如下截图。
动画异常
在AnimatorListener监听中的onAnimationEnd方法重新调起动画,会导致animation状态一直处于running状态 第二次调起的动画结束时不会执行onAnimationEnd方法。
解决办法:在onAnimationEnd方法中使用handler去执行
StateListDrawable跟ColorStateList混用异常
StateListDrawable 在Android8.1中设置未background 会导致报错。测试Android13 上不会报错
我们获取常用的方法是“getRunningTasks”,今天调试时发现失效。我们看最新的方法注释:
As of Build.VERSION_CODES.LOLLIPOP, this method is no longer available to third party applications: the introduction of document-centric recents means it can leak person information to the caller.
翻译一下:
从Android 5.0(Lollipop)开始,getRunningTasks()方法不再对第三方应用程序可用。这是因为文档为中心的最近任务列表意味着它可以将个人信息泄露给调用者。为了向后兼容,该方法仍然返回其数据的一小部分:至少是调用者自己的任务,可能还包括一些其他已知不敏感的任务,如“home”。
所以我在调用时只返回了本app的activity栈内页面。