<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[GerryRun的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/GerryRun</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; GerryRun]]></copyright><item><title><![CDATA[Android实现换肤思路整理]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/113714190</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/113714190</guid><author>GerryRun</author><pubDate>Sat, 06 Feb 2021 15:03:37 +0800</pubDate><description><![CDATA[Android实现换肤思路整理整体思路总结：1.获取APP 的Resources对象2.使用反射创建AssetManager对象3.根据设备的显示器信息和配置，创建Resource对象4.使用PackageManager，根据皮肤包路径获取皮肤包包名5.注册ActivityLifeCycle，监测activity oncreate回调，配置自定义的layoutInflater对象，自定义layoutinflater对象接管View		  的创建过程，在创建View时统计需要替换属性的view6.触发换肤动作]]></description><category></category></item><item><title><![CDATA[设计模式之-----观察者模式]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/108713009</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/108713009</guid><author>GerryRun</author><pubDate>Mon, 21 Sep 2020 16:21:10 +0800</pubDate><description><![CDATA[设计模式之-----观察者模式
定义：

定义了对象之间  一对多的依赖关系，其中被观察者是一方，观察者是多方，在被观察者发生改变时，被观察者主动调用方法，通知所有观察者的一种设计模式。

原理：

定义
①被观察者类，内部需要实现本身业务数据的存储，有保存所有观察者的一个数据结构类，
②观察者统一接口，定义一个统一通知方法，供被观察者数据改变后进行调用通知。
③声明观察者和被观察者对象，被观察者和观察者一对多绑定之后，被观察者数据发生改变之后，主动调用观察者的抽象接口方法进行通知。

此设计模式优缺点：
]]></description><category></category></item><item><title><![CDATA[Android平台上大长图（图片很大的那种）的加载原理和方式]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/108029944</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/108029944</guid><author>GerryRun</author><pubDate>Sun, 16 Aug 2020 00:26:38 +0800</pubDate><description><![CDATA[好久好久没有学习了，每天在王者农药里浸泡着，终于上了王者段位之后，心里空空如也！！是时候开始学习了，向高级进发！！！
学习感想：
在学习之前，不使用第三方框架的情况下，会有：哇，这咋搞，直接OOM呀！一脸萌币
学习之后，我去，就这么简单？？？
正文开始

总结一下很简单了：
声明 BitmapFactory.Options和Rect对象，对Options对象属性操作，获取图片信息和显示图片是否复用内存；对Rect对象的  left，top，right，bottom属性值操作，动态设置图片显示区域，使用构建的]]></description><category></category></item><item><title><![CDATA[Kotlin 枚举类]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/105607903</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/105607903</guid><author>GerryRun</author><pubDate>Sun, 19 Apr 2020 00:19:06 +0800</pubDate><description><![CDATA[kotlin 中也如Java一样,有枚举类这个类型。
枚举类的定义：在某些情况下,一个类的是有限而且固定的,比如季节类、月份类、等等，这种实例有限而且固定的类,叫做枚举类。
作用：在早期代码中，可能会使用静态常量表示枚举，比如下面定义的常量：
	//申请手机状态的权限的 回执码
    var REQUEST_READ_PHONE_STATE: Int = 1001
	//申请手机存储权限的 回执...]]></description><category></category></item><item><title><![CDATA[Android 声音分贝控制锁屏demo实现]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/104885509</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/104885509</guid><author>GerryRun</author><pubDate>Sun, 15 Mar 2020 21:22:31 +0800</pubDate><description><![CDATA[标题demo实现总体逻辑:
1. 声明权限
2. 声明，注册 receiver，接收注册设别管理器结果
3. 完成注册APP为设备管理器
4. 录音权限申请
5. 编写类文件,实现业务逻辑
OK，我们开始~~

声明权限如下

    &lt;!--锁屏权限  需要注册为设备管理器--&gt;
    &lt;uses-permission android:name="android.permis...]]></description><category></category></item><item><title><![CDATA[多语言需求时，在华为手机上，切换语言环境时，string资源获取默认资源问题]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/103703264</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/103703264</guid><author>GerryRun</author><pubDate>Wed, 25 Dec 2019 18:04:12 +0800</pubDate><description><![CDATA[如果你遇到相同的问题，请检查是不是用的Application的上下文调用的getstring（），请换成使用当前activity上下文获取
在实现多语言需求时，测试会不定时叮我一下，你看英文环境下，怎么会显示汉语呢？？？一脸萌币呀，TMD我咋知道，发泄归发泄，问题还是要解决的啊
询问度娘，度娘说她也不晓得，我的天！！
想了好多个方法解决啊，一开始是使用的静态类或者静态变量获取保存string资源，...]]></description><category></category></item><item><title><![CDATA[android edittxet 设置可点击不可编辑状态]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/103204773</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/103204773</guid><author>GerryRun</author><pubDate>Fri, 22 Nov 2019 17:38:16 +0800</pubDate><description><![CDATA[xml布局设置：
editText.setCursorVisible(false);
editText.setFocusable(false);
editText.setFocusableInTouchMode(false);


代码动态设置：
editText.setCursorVisible(false);
editText.setFocusable(false);
editText.set...]]></description><category></category></item><item><title><![CDATA[No implementation found for int com.baidu.idl.facesdk.FaceSDK.getARGBFromYUV]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/103079482</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/103079482</guid><author>GerryRun</author><pubDate>Fri, 15 Nov 2019 09:50:25 +0800</pubDate><description><![CDATA[做百度人脸识别需求的时候，收到日志如下：
No implementation found for int com.baidu.idl.facesdk.FaceSDK.getARGBFromYUV

一脸萌币有没有，从头到尾好好对比一下步骤，发下发了一个很低级的错误，文档中的第一步在application中初始化SDK的步骤,你说是不是脑子有坑

    /**
     * 初始化SDK
    ...]]></description><category></category></item><item><title><![CDATA[git代码 回滚]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/102934599</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/102934599</guid><author>GerryRun</author><pubDate>Wed, 06 Nov 2019 14:41:44 +0800</pubDate><description><![CDATA[第一步：
使用命令行 git log 获取 push记录
对应的命令行：
git log

获取到的数据：

commit a49f0521de426e0f3375faead56b26b667ed90f7 (HEAD -&gt; master, origin/master)
Author:GerryRun &lt;729312523@qq.com&gt;
Date:   Wed Nov 6 1...]]></description><category></category></item><item><title><![CDATA[使用Javadoc生成API文档步骤]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/100143442</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/100143442</guid><author>GerryRun</author><pubDate>Thu, 29 Aug 2019 18:05:54 +0800</pubDate><description><![CDATA[1.配置好Java环境变量，
2.编写好一个Java程序，OK，准备工作已完成。
我的测试类文件保存在 C:\Users\90383\Desktop\JavadocTest 文件夹下，内容如下：
/**
 * 测试类
 */
public class Test2 {

	/**
	 * 变量
	 */
	public String str;

    /**
     * 构造器
     *
 ...]]></description><category></category></item><item><title><![CDATA[kotlin实现静态类和静态方法]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/100116432</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/100116432</guid><author>GerryRun</author><pubDate>Wed, 28 Aug 2019 14:03:41 +0800</pubDate><description><![CDATA[kotlin中，声明静态类的方法很简单：
/**
 * 类名前的class替换成object，为静态类，此类下的所有对象和函数，都是静态,
 * 所有方法都为静态方法，如工具类、常量池、
 */
object LogUtilsCopy {

    var isDebug = BuildConfig.DEBUG
    
	fun doSomething():String{
		doSomeThi...]]></description><category></category></item><item><title><![CDATA[Java 获取当天的零点时间戳]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/97266622</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/97266622</guid><author>GerryRun</author><pubDate>Thu, 25 Jul 2019 15:35:34 +0800</pubDate><description><![CDATA[/**
     * 获取当天的零点时间戳
     *
     * @return 当天的零点时间戳
     */
    public static long getTodayStartTime() {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
    ...]]></description><category></category></item><item><title><![CDATA[Androidstudio引用maven库(jcenter,Google)下载依赖失败的解决方法]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/92070059</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/92070059</guid><author>GerryRun</author><pubDate>Sat, 15 Jun 2019 10:54:29 +0800</pubDate><description><![CDATA[你有体会过前一天下班前一切正常,第二天上班打开Androidstudio编译项目远程依赖库全部下载失败的情形吗?好吧,我有，虽然没有找到根源问题，但是经过一天的探索，总算是找到了解决办法
大家在开发过程中，免不了会依赖一些第三方库，但是可能因为网关的问题，可能访问失败，导致下载失败，进而项目无法编译影响项目进度。在网上搜了一些解决方法，清一色推荐使用阿里云仓库服务，我在接入之后发现，阿里云的仓库服...]]></description><category></category></item><item><title><![CDATA[出现：trying to draw too large(138078000bytes) bitmap：]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/91583521</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/91583521</guid><author>GerryRun</author><pubDate>Wed, 12 Jun 2019 18:14:00 +0800</pubDate><description><![CDATA[出现原因：将高分辨率图片放在了低分辨率文件夹下了
我遇到的情况是我把1080*1920分辨率的切图放在了drawable文件夹下，出现了如题的报错，
解决的方法：根据分辨率选择放置所在文件夹

...]]></description><category></category></item><item><title><![CDATA[git pull 相关问题:Git Pull Failed: refusing to merge unrelated histories]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/91358882</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/91358882</guid><author>GerryRun</author><pubDate>Sun, 09 Jun 2019 23:09:13 +0800</pubDate><description><![CDATA[pull 分支时报以下错误:
Git Pull Failed: refusing to merge unrelated histories

处理办法:在pull的命令行之后添加如下规则：–allow-unrelated-histories
git pull &lt;远程主机名&gt; &lt;远程分支&gt; --allow-unrelated-histories
比如：
 git pull m...]]></description><category></category></item><item><title><![CDATA[上传Google市场时，提示安装包未进行 zipalign，禁止传包问题的解决方法]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/91353505</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/91353505</guid><author>GerryRun</author><pubDate>Sun, 09 Jun 2019 15:34:09 +0800</pubDate><description><![CDATA[如题的问题：

Google官网介绍：
我们强烈推荐在新的和已经发布的程序上使用zipalign工具来得到优化后的版本——即使你的程序是在老版本的Android平台下开发的。在你的应用程序上运行zipalign，使得在运行时Android与应用程序间的交互更加有效率。因此，这种方式能够让应用程序和整个系统运行得更快。Android SDK中包含一个“zipalign”的工具，它能够对打包的应用程序...]]></description><category></category></item><item><title><![CDATA[PopupWindow中的EditText无法弹出软键盘]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/91353147</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/91353147</guid><author>GerryRun</author><pubDate>Sun, 09 Jun 2019 15:02:49 +0800</pubDate><description><![CDATA[偶然之间，发现如题问题，解决方案:
PopupWindow.setFocusable(true);

谨记…

]]></description><category></category></item><item><title><![CDATA[Only the Kotlin standard library is allowed to use the 'kotlin' package]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/90761070</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/90761070</guid><author>GerryRun</author><pubDate>Mon, 03 Jun 2019 23:35:30 +0800</pubDate><description><![CDATA[解决方法:
请不要使用kotlin作为项目中的包名，比如修改为“kotlinTest”即解决此问题。

]]></description><category></category></item><item><title><![CDATA[对Android apk 签名  --apksigner]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/90209513</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/90209513</guid><author>GerryRun</author><pubDate>Tue, 14 May 2019 16:29:16 +0800</pubDate><description><![CDATA[因支持V1和V2签名，故选用apksigner 进行手动签名：
	切到Android SDK/build-tools/SDK版本, 输入命令
    apksigner sign --ks 密钥库名 --ks-key-alias 密钥别名 xxx.apk

    若密钥库中有多个密钥对,则必须指定密钥别名
    apksigner sign --ks 密钥库名 --ks-key-alias 密...]]></description><category></category></item><item><title><![CDATA[Android  代码审计分享(基于AndroiBugs)]]></title><link>https://blog.youkuaiyun.com/GerryRun/article/details/87930852</link><guid>https://blog.youkuaiyun.com/GerryRun/article/details/87930852</guid><author>GerryRun</author><pubDate>Tue, 26 Feb 2019 10:53:11 +0800</pubDate><description><![CDATA[站在巨人的肩膀上实现，先感谢一下作者，奉上AndroidBugs项目的GitHub地址
正题
一.AndroiBugs（window）
(地址:https://github.com/AndroBugs/AndroBugs_Framework)
AndroiBugs是在Windows环境下监测Android安装包的一个工具,经实践该工具能够扫描出项目中的网络安全问题，webView使用隐患，明码保存...]]></description><category></category></item></channel></rss>