<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Iturbo]]></title><description><![CDATA[这个人太懒，啥都没留下。。。]]></description><link>https://blog.youkuaiyun.com/worst_hacker</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; worst_hacker]]></copyright><item><title><![CDATA[List遍历抛出UnsupportedOperationException在Android不同版本上不同表现]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/105864421</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/105864421</guid><author>worst_hacker</author><pubDate>Thu, 30 Apr 2020 16:36:53 +0800</pubDate><description><![CDATA[昨天遇到个问题，对字符串按照自然顺序排序，比如说"abd03156"-&gt;"01356abd"

最开始是这么写的：


val toList = newValue.toList()
Collections.sort(toList)
var result = ""
for (i in toList) {
    result += i
}

newValue设置的初始值为“0“

上面的代码在...]]></description><category></category></item><item><title><![CDATA[一个非常好玩的问题-Dialog弹出失败]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/103418013</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/103418013</guid><author>worst_hacker</author><pubDate>Fri, 06 Dec 2019 10:35:24 +0800</pubDate><description><![CDATA[前提：DialogManager统一管理所有的弹窗弹出和消失，它是一个单例

现象：

MainActivity中点击一个按钮，弹出一个弹窗（因为一些奇怪的理由，导致实现的时候这个弹窗并不是用PopupWindow或者Dialog来实现，而是通过activity.window.decorView.addView的来展示的（ps:这导致后面分析的时候出现来一点点方向上的错误）），然后退出app（这时...]]></description><category></category></item><item><title><![CDATA[android多状态布局]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/82793099</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/82793099</guid><author>worst_hacker</author><pubDate>Thu, 20 Sep 2018 23:27:28 +0800</pubDate><description><![CDATA[app中请求服务器数据后进行绘制页面时会有多种状态，比如网络请求过程中loading状态，加载出错状态，获取数据发现数据为空状态，加载过程中网络异常页面和正常加载完毕的数据展示页面。

一般的做法是将多个状态封装成自定义View，然后在每一个页面的布局文件中引入，在加载数据时展示不同的状态。

可以有另一种方案，通过代码编写View的方式，将自定义View添加到页面中，这样可以避免了在每一个布局中...]]></description><category></category></item><item><title><![CDATA[关于RecyclerView Adapter的思考]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78541021</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78541021</guid><author>worst_hacker</author><pubDate>Wed, 19 Sep 2018 17:42:58 +0800</pubDate><description><![CDATA[https://www.jianshu.com/p/1975f88d5139 在看这篇文章的时候看到有说RecyclerView 到底如何适配多种布局？ 在用的时候确实也是在用多种ItemType然后根据不同的type设置不同的ViewHolder，那么有没有一种比较好的方式呢？ 先来回顾下现有的方案：

一般的做法是在服务器返回的Bean里加一个字段，用以区分Item类型， 然后在请求服务器返回...]]></description><category></category></item><item><title><![CDATA[Dagger2关于Scope的理解]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/80019040</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/80019040</guid><author>worst_hacker</author><pubDate>Sat, 21 Apr 2018 15:09:32 +0800</pubDate><description><![CDATA[看简书的两篇文章的时候关于Dagger2中的@Singleton的理解和Android：dagger2让你爱不释手-重点概念讲解、融合篇，里面讲解了关于Scope的作用和SingleTon为什么能实现单例。在上一篇文章中也有讲Scope的作用。这里再说一下，Scope是用于组织Component。在Dagger2中， Scope机制关注的是保持单例和Scope存在周期一致。 实际上，它意味着@Ap...]]></description><category></category></item><item><title><![CDATA[Android中Dagger2的使用]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/79975262</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/79975262</guid><author>worst_hacker</author><pubDate>Thu, 19 Apr 2018 10:02:48 +0800</pubDate><description><![CDATA[Dagger2是一个在Java和android中使用的完全静态的编译时依赖注入框架。它改编了由Square创建的早期版本，现在由Google维护。dagger2的优点    首先说下dagger2的优点，为什么用dagger2（额，也可以说我看着大神用所以我也用吧，哈哈），掘金上的这篇文章是个很好的引入的例子，总结下来大概有三点：1.增加开发效率、省去重复的简单体力劳动    首先new一个实例的...]]></description><category></category></item><item><title><![CDATA[我的成长之路]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/79970716</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/79970716</guid><author>worst_hacker</author><pubDate>Tue, 17 Apr 2018 10:43:44 +0800</pubDate><description><![CDATA[每天需要看的文章

https://github.com/xurui1995/Sword-pointing-to-offer/tree/master/Java

http://hencoder.com

https://leetcode-cn.com/problemset/algorithms/

从15年做android开发到现在3年多一点，各方面的原因，也许是自己没有那么大的热情完全投入到开发...]]></description><category></category></item><item><title><![CDATA[Fragment沉浸式状态栏问题]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78541114</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78541114</guid><author>worst_hacker</author><pubDate>Thu, 08 Feb 2018 09:33:20 +0800</pubDate><description><![CDATA[小米miui9适配问题（状态栏适配和弹窗适配）http://blog.youkuaiyun.com/guolin_blog/article/details/51763825http://angeldevil.me/2014/09/02/About-Status-Bar-and-Navigation-Bar/项目里主页是类似于喜马拉雅的底部四个tab，然后一个Activity包含了4个Fragment，但是第4...]]></description><category></category></item><item><title><![CDATA[关于播放器锁屏图片不显示问题]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78541045</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78541045</guid><author>worst_hacker</author><pubDate>Wed, 15 Nov 2017 15:10:34 +0800</pubDate><description><![CDATA[正常通知栏是没有问题的，但是锁屏后图片无法展示，暂停和previous和next按钮也是正常的。
开始没太了解，不知道具体这个锁屏是如何控制和展现的，搜了一下资料发现有提到
http://2bab.me/2014/12/10/Lollipop-1-Android-5-0-APIs-Guide/
“默认情况下，Android 5.0 的 notification 会在用户的锁屏界面展示”
这]]></description><category></category></item><item><title><![CDATA[Android签名问题]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78297959</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78297959</guid><author>worst_hacker</author><pubDate>Wed, 15 Nov 2017 15:04:37 +0800</pubDate><description><![CDATA[昨天打包出现了个超级好玩的问题，正常测试包没问题，但是打出来的正式包进去就崩溃。报错为：java.lang.ExceptionInInitializerError
而MUI上抓到的错误log是java.lang.ExceptionInInitializerError和Caused by: android.view.InflateException: Binary XML file line #1]]></description><category></category></item><item><title><![CDATA[Android媒体应用（七）--处理音频输出的变化]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78037779</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78037779</guid><author>worst_hacker</author><pubDate>Wed, 15 Nov 2017 14:53:57 +0800</pubDate><description><![CDATA[How to notice when the volume controls change, the headphones are unplugged, and some other apps wants to play audio.]]></description><category></category></item><item><title><![CDATA[Android媒体应用（六）--响应媒体按钮]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78037754</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78037754</guid><author>worst_hacker</author><pubDate>Wed, 15 Nov 2017 14:22:06 +0800</pubDate><description><![CDATA[How an app handles events from transport buttons on peripheral hardware.]]></description><category></category></item><item><title><![CDATA[Android媒体应用（五）--构建视频应用程序]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78037741</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78037741</guid><author>worst_hacker</author><pubDate>Tue, 14 Nov 2017 17:13:05 +0800</pubDate><description><![CDATA[How to build a video app in a single activity with a media session and a media controller.]]></description><category></category></item><item><title><![CDATA[Android媒体应用（四）--构建音频应用程序]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78037736</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78037736</guid><author>worst_hacker</author><pubDate>Wed, 20 Sep 2017 10:20:41 +0800</pubDate><description><![CDATA[How to build an audio app using a media browser client activity containing a media controller and a media browser service containing a media session.]]></description><category></category></item><item><title><![CDATA[Android媒体应用（三）--使用媒体会话]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78037711</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78037711</guid><author>worst_hacker</author><pubDate>Wed, 20 Sep 2017 10:19:38 +0800</pubDate><description><![CDATA[A media session hides the details of the code that implements a player/recorder and provides a standard interface for communicating with your UI via media controllers.]]></description><category></category></item><item><title><![CDATA[Android媒体应用（二）--综述]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78037618</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78037618</guid><author>worst_hacker</author><pubDate>Wed, 20 Sep 2017 10:13:55 +0800</pubDate><description><![CDATA[An introduction to media sessions and media controllers and how they are used in audio and video apps.]]></description><category></category></item><item><title><![CDATA[Android媒体应用（一）]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/78037503</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/78037503</guid><author>worst_hacker</author><pubDate>Wed, 20 Sep 2017 10:05:57 +0800</pubDate><description><![CDATA[媒体应用
本节介绍如何将媒体播放器应用程序分离到媒体控制器（用于UI）和媒体会话（对于实际播放器）。它描述了两种媒体应用程序架构：一种客户端/服务器设计适用于音频应用程序和单一活动设计的视频播放器。它还显示了如何使媒体应用程序响应硬件控制，并与使用音频输出流的应用程序协作。


媒体应用程序概述
介绍媒体会议和媒体控制器以及如何在音频和视频应用中使用它们。
使用媒体会话
媒体会话隐藏]]></description><category></category></item><item><title><![CDATA[Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/77968965</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/77968965</guid><author>worst_hacker</author><pubDate>Wed, 13 Sep 2017 17:54:47 +0800</pubDate><description><![CDATA[Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value]]></description><category></category></item><item><title><![CDATA[腾讯广点通开屏广告错误码]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/76962913</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/76962913</guid><author>worst_hacker</author><pubDate>Wed, 09 Aug 2017 09:55:47 +0800</pubDate><description><![CDATA[安卓 开屏广告 错误码 100135]]></description><category></category></item><item><title><![CDATA[kotlin学习之单例]]></title><link>https://blog.youkuaiyun.com/worst_hacker/article/details/73467360</link><guid>https://blog.youkuaiyun.com/worst_hacker/article/details/73467360</guid><author>worst_hacker</author><pubDate>Mon, 19 Jun 2017 15:04:40 +0800</pubDate><description><![CDATA[关于单例模式的介绍可以看这篇文章：
http://cantellow.iteye.com/blog/838473



就拿第一种做例子，懒汉式
public class SingleTon {
    private static SingleTon instance;
    private SingleTon (){}

    public static SingleTon g]]></description><category></category></item></channel></rss>