<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[setsail_z的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/setsail_z</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; setsail_z]]></copyright><item><title><![CDATA[在开发板上使用USB摄像头，CameraX报错：java.lang.IllegalArgumentException: Provided camera selector unable to resol]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/144608409</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/144608409</guid><author>setsail_z</author><pubDate>Fri, 20 Dec 2024 12:50:41 +0800</pubDate><description><![CDATA[解决方案：提高Camera版本到1.3.0及以上，使用 CameraSelector.LENS_FACING_EXTERNAL。]]></description><category></category></item><item><title><![CDATA[冷启动CameraX打开摄像头慢，Camera LensFacing verification failed xxx]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/144560825</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/144560825</guid><author>setsail_z</author><pubDate>Wed, 18 Dec 2024 14:47:16 +0800</pubDate><description><![CDATA[在Application里实现 CameraXConfig.Provider 接口，指定 CameraSelector，如CameraSelector.LENS_FACING_BACK。]]></description><category></category></item><item><title><![CDATA[系统APP安装更新包出现：解析包错误Permission Denial: that is not exported from UID 1000]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/141396275</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/141396275</guid><author>setsail_z</author><pubDate>Wed, 21 Aug 2024 16:13:05 +0800</pubDate><description><![CDATA[此时会报错，SecurityException: Provider must not be exported。1. 将Fileprovider exported设为true。]]></description><category></category></item><item><title><![CDATA[连续打开两个Activity，后打开的那个是透明背景]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/84282194</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/84282194</guid><author>setsail_z</author><pubDate>Tue, 20 Nov 2018 09:26:19 +0800</pubDate><description><![CDATA[这么做是把第二个Activity作为覆盖层以达到转场的效果，但是在某些机器上出现的现象是透明背景显示为黑色。其实这是Android M的一个bug，详见：https://issuetracker.google.com/issues/37063538

要想对Android M解决这个问题的话，用Handler post执行第二个Activity启动的代码，延时一下。...]]></description><category></category></item><item><title><![CDATA[recyclerview notifyiteminserted和setHasFixedSize的一个坑]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/81013975</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/81013975</guid><author>setsail_z</author><pubDate>Thu, 12 Jul 2018 13:11:37 +0800</pubDate><description><![CDATA[开发中调用notifyiteminserted方法，发现没有立即在列表中显示新增的项，后来搜了一下是setHasFixedSize(true)导致，mark一下，有时间了跟踪一下源码看看为什么。可参考问答：https://stackoverflow.com/questions/39683237/android-recyclerview-adapter-notifyiteminserted-and-...]]></description><category></category></item><item><title><![CDATA[两个recyclerview放在同一个布局中的坑]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/79409074</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/79409074</guid><author>setsail_z</author><pubDate>Thu, 01 Mar 2018 10:34:48 +0800</pubDate><description><![CDATA[问题描述：比如把两个recyclerview放到一个linearlayout中，两个recyclerview分别用weight来控制大小，将layout_width(或layout_height)设为0dp。如果这样设置，会发现，在刷新recyclerview时（notifyDataSetChanged），adapter会bind所有views，而不是可见区域内的views，并且scrollToP...]]></description><category></category></item><item><title><![CDATA[当EditText做Recyclerview头部时，界面绘制好后发现Recyclerview向上滚动了一点的问题]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/78140352</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/78140352</guid><author>setsail_z</author><pubDate>Sat, 30 Sep 2017 10:44:50 +0800</pubDate><description><![CDATA[在Recyclerview中加这个属性： descendantFocusability =
 "beforeDescendants"]]></description><category></category></item><item><title><![CDATA[Fragment中getActivity()或getContext()返回null的问题]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/77989769</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/77989769</guid><author>setsail_z</author><pubDate>Fri, 15 Sep 2017 11:28:07 +0800</pubDate><description><![CDATA[安卓app有一种特殊情况，就是 app运行在后台的时候，系统资源紧张的时候或者应用出现bug奔溃的时候导致把app的资源全部回收（杀死app的进程），这时把app再从后台返回到前台时，app会重启。这种情况下文简称为：“内存重启”。（屏幕旋转等配置变化也会造成当前Activity重启，本质与“内存重启”类似）
在系统要把app回收之前，系统会把Activity的状态保存下来，Activity的F]]></description><category></category></item><item><title><![CDATA[java.lang.IllegalStateException: Fragment not attached to Activity异常的一个场景]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/77989181</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/77989181</guid><author>setsail_z</author><pubDate>Fri, 15 Sep 2017 10:51:10 +0800</pubDate><description><![CDATA[有一个场景是在子线程中调用Fragment的getString()方法（如在Retrofit回调中、handler中等），而此时，有可能app被内存回收了，那么此时fragment已经detach了，就会发生这个异常。
解决方法：
1. 如果在Fragment里，并且是在子线程中调用getString()方法，则需要加一个isAdded()判断，这是一个Fragment类中的方法。
if(i]]></description><category></category></item><item><title><![CDATA[关于解决用Retrofit直接发送json请求时被OKHTTP加了一个key: nameValuePairs]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/62430346</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/62430346</guid><author>setsail_z</author><pubDate>Thu, 16 Mar 2017 17:55:38 +0800</pubDate><description><![CDATA[别用org.json.JSONObject，用com.google.gson.JsonObject即可....]]></description><category></category></item><item><title><![CDATA[关于Facebook的开源项目Keyframes]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/54954792</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/54954792</guid><author>setsail_z</author><pubDate>Thu, 09 Feb 2017 20:03:21 +0800</pubDate><description><![CDATA[Keyframes Animation Facebook 开源]]></description><category></category></item><item><title><![CDATA[关于Google Wallet的使用]]></title><link>https://blog.youkuaiyun.com/setsail_z/article/details/53424309</link><guid>https://blog.youkuaiyun.com/setsail_z/article/details/53424309</guid><author>setsail_z</author><pubDate>Thu, 01 Dec 2016 17:46:47 +0800</pubDate><description><![CDATA[一些接入google wallet支付的坑]]></description><category></category></item></channel></rss>