<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Theprogramleaders的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Theprogramleaders</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Theprogramleaders]]></copyright><item><title><![CDATA[android Launcher3 动态设置一个快捷图标（添加快捷图标）]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/123873003</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/123873003</guid><author>Theprogramleaders</author><pubDate>Thu, 31 Mar 2022 15:25:49 +0800</pubDate><description><![CDATA[android Launcher3 动态设置一个快捷图标（添加快捷图标）]]></description><category></category></item><item><title><![CDATA[Android 文本设置一个或多个关键字的颜色（插入关键字带颜色）]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/121638360</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/121638360</guid><author>Theprogramleaders</author><pubDate>Tue, 30 Nov 2021 17:33:49 +0800</pubDate><description><![CDATA[废话不多说上需求： 文本里面固定字体添加颜色





代码：






import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;

import java.util.List;

/**
* @author CHY
*  ...]]></description><category></category></item><item><title><![CDATA[Android 自定义圆角图片的ImageView]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/116748335</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/116748335</guid><author>Theprogramleaders</author><pubDate>Thu, 13 May 2021 14:19:01 +0800</pubDate><description><![CDATA[每次写圆角都要去网上找，在这里做个记录： 圆角的imageview



/**
 * 圆角的ImageView
 */
public class MyCircleImageView extends AppCompatImageView {
    private float topLeftRadius;
    private float topRightRadius;
    private float bottomLeftRadius;
    private float bottomRightRa.]]></description><category></category></item><item><title><![CDATA[Android 自带倒计时器的CountDownTimer使用]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/108714877</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/108714877</guid><author>Theprogramleaders</author><pubDate>Mon, 21 Sep 2020 17:33:11 +0800</pubDate><description><![CDATA[在我们做项目的时候经常会用到倒计时功能，一般的都用Hander + time 这样其实很繁琐，代码还多还要考虑内存。其实Android 有自带封装好的倒计时类CountDownTimer 跟大家分享下使用

在一个TextView不断显示剩下的时间，代码如下：




private TextView vertifyView;

private CountDownTimer timer = new CountDownTimer(10000, 1000) {



@Override

public vo..]]></description><category></category></item><item><title><![CDATA[RxPermissions 动态权限管理]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/107688937</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/107688937</guid><author>Theprogramleaders</author><pubDate>Thu, 30 Jul 2020 14:10:47 +0800</pubDate><description><![CDATA[1、介绍：

This library allows the usage of RxJava with the new Android M permission model.
即： 这个库支持RxJava与新的Android M版本权限模型一起使用。

这个库对动态权限的管理非常方便，使用起来也比较简单




	
	
   /**
         * 权限统一处理
         */
        RxPermissions.getInstance(this)
                ..]]></description><category></category></item><item><title><![CDATA[关于android studio 出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解决办法]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/106049304</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/106049304</guid><author>Theprogramleaders</author><pubDate>Mon, 11 May 2020 10:50:01 +0800</pubDate><description><![CDATA[Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
&gt; Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/t]]></description><category></category></item><item><title><![CDATA[Android setSpanSizeLookup 不被调用Log 也不走]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/103680981</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/103680981</guid><author>Theprogramleaders</author><pubDate>Tue, 24 Dec 2019 12:06:45 +0800</pubDate><description><![CDATA[setSpanSizeLookup方法作用就返回不同的列表



gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
    @Override
    public int getSpanSize(int i) {
        int stringLenth = item.getValu...]]></description><category></category></item><item><title><![CDATA[Android RecyclerView的滑动监听]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/103614918</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/103614918</guid><author>Theprogramleaders</author><pubDate>Thu, 19 Dec 2019 15:21:02 +0800</pubDate><description><![CDATA[RecyclerView提供了addOnScrollListener 做滑动监听里面提供了两个方法  onScrollStateChanged和 onScrolled 

如果只做滑动监听onScrolled就够用了


从onScrolled方法里面int position = linearLayoutManager.findFirstVisibleItemPosition(); ...]]></description><category></category></item><item><title><![CDATA[Android SharedPreferences 保存数据最基本用法]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/88620486</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/88620486</guid><author>Theprogramleaders</author><pubDate>Sun, 17 Mar 2019 15:48:14 +0800</pubDate><description><![CDATA[SharedPreferences网上查半天查不到想要的用法，自己写一个做个记录

最简单的sp使用


存储：


SharedPreferences sp = getSharedPreferences(&quot;sp_demo&quot;, Context.MODE_PRIVATE);
sp.edit().putString(&quot;name&quot;, &quot;小张&quot;).putInt(&quot;age&quot;, 11).commit()...]]></description><category></category></item><item><title><![CDATA[Android 自定义View 添加到 ScrollView 不显示]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/88388216</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/88388216</guid><author>Theprogramleaders</author><pubDate>Mon, 11 Mar 2019 09:50:47 +0800</pubDate><description><![CDATA[今天碰到了这样一个问题，就是自定义view继承的view ，添加到ScrollView当ScrollView &amp;gt;700dp不显示的问题，

先说解决方案：在ScrollView内部在加一层 RelativeLayout这样就能显示出来了 ，因为ScrollView初始化的高度为0，自定义

view获取不到高度




...]]></description><category></category></item><item><title><![CDATA[Android  Studio  一直在不停的build  不停的刷新]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/88015561</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/88015561</guid><author>Theprogramleaders</author><pubDate>Thu, 28 Feb 2019 10:15:19 +0800</pubDate><description><![CDATA[　今天早上启动 Android Studio，不停的Indexing。不是那种一次很久的，而是频繁重复，一秒几次的那种。

 解决办法 ：File&amp;gt;InvalidateCaches/Restart 



     

                                    ...]]></description><category></category></item><item><title><![CDATA[非常强大开源的第三方框架FlycoTabLayout（TabLayout） 里面提供了非常多的属性]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/83615344</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/83615344</guid><author>Theprogramleaders</author><pubDate>Thu, 01 Nov 2018 09:39:32 +0800</pubDate><description><![CDATA[原文：https://blog.youkuaiyun.com/analyzesystem/article/details/51426473

 ]]></description><category></category></item><item><title><![CDATA[Android 轮播指示器变大]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82772590</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82772590</guid><author>Theprogramleaders</author><pubDate>Wed, 19 Sep 2018 15:15:11 +0800</pubDate><description><![CDATA[

项目有一个这样的轮播图，3补搞定

1、先在 project的build.gradle 添加:


allprojects {
		repositories {
			...
			maven { url &quot;https://jitpack.io&quot; }
		}
	}

 

 2、然后在module的build.gradle 添加:


dependencies {
	        compi...]]></description><category></category></item><item><title><![CDATA[Android沉浸式状态栏（非常简单）]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82748658</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82748658</guid><author>Theprogramleaders</author><pubDate>Mon, 17 Sep 2018 20:49:29 +0800</pubDate><description><![CDATA[废话不多说直接上代码

在onCreate（） 方法里面



if (Build.VERSION.SDK_INT &amp;gt;= Build.VERSION_CODES.KITKAT) {

    int flagTranslucentStatus = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;

    int flagTransluc...]]></description><category></category></item><item><title><![CDATA[福利]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82748428</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82748428</guid><author>Theprogramleaders</author><pubDate>Mon, 17 Sep 2018 20:28:18 +0800</pubDate><description><![CDATA[自己看到的一些好文章地址以保存今天分享给大家
 

1 下拉刷新   https://segmentfault.com/a/1190000010066071  https://www.oschina.net/p/pulltorefresh

2 自定义下拉框 http://blog.youkuaiyun.com/a497393102/article/details/9279309


适配https://gi...]]></description><category></category></item><item><title><![CDATA[屏幕适配（三分钟搞定）]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82748342</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82748342</guid><author>Theprogramleaders</author><pubDate>Mon, 17 Sep 2018 20:25:42 +0800</pubDate><description><![CDATA[写一篇非常简单的屏幕适配，主要自己使用。

一共分为3步

第一步、

下载插件ScreenMath 

第二步、

在Values里创建dimens 

dimens内容为： 



&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;resources&amp;gt;
    &amp;lt;!-- Your custom size defind by refer...]]></description><category></category></item><item><title><![CDATA[Android 的图片压缩]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82455064</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/82455064</guid><author>Theprogramleaders</author><pubDate>Thu, 06 Sep 2018 10:20:30 +0800</pubDate><description><![CDATA[我用的图片主要分为3种       1、质量压缩 ，2、尺寸压缩，3、Luban压缩（鲁班）

一、质量压缩

   质量压缩的特点是:  File形式的图片确实被压缩了, 但是当你重新读取压缩后的file为 Bitmap是,它占用的内存并没有改变           

  质量压缩主要借助Bitmap中的compress方法实现：


public boolean compress (Bitm...]]></description><category></category></item><item><title><![CDATA[Glide源码分析 及    Glide + picasso+ fresco 区别 和Gilde圆形图片等。]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/81464144</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/81464144</guid><author>Theprogramleaders</author><pubDate>Tue, 07 Aug 2018 00:45:44 +0800</pubDate><description><![CDATA[glide源码分析：

一。Glide的with方法可以接收五种类型的Context


    

1.public static RequestManager with(Context context) {
        
RequestManagerRetriever retriever = RequestManagerRetriever.get();
        
return re...]]></description><category></category></item><item><title><![CDATA[Android 三级缓存(网络+LruCache(原理分析)+DeskLruCache)]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/81315666</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/81315666</guid><author>Theprogramleaders</author><pubDate>Thu, 02 Aug 2018 10:03:51 +0800</pubDate><description><![CDATA[ 

什么是三级缓存

网络缓存, 不优先加载, 速度慢,浪费流量
	本地缓存, 次优先加载, 速度快
	内存缓存, 优先加载, 速度最快
为什么要使用三级缓存

如今的 Android App 经常会需要网络交互，通过网络获取图片是再正常不过的事了
	假如每次启动的时候都从网络拉取图片的话，势必会消耗很多流量。在当前的状况下，对于非wifi用户来说，流量还是很贵的，一个很耗流量的应用，其用户数量...]]></description><category></category></item><item><title><![CDATA[T-MVP 比MVP更加的解耦灵活的利用泛型(附带一个快速创建MVP接口的Android Studio插件-TMVPHelper)]]></title><link>https://blog.youkuaiyun.com/Theprogramleaders/article/details/81233720</link><guid>https://blog.youkuaiyun.com/Theprogramleaders/article/details/81233720</guid><author>Theprogramleaders</author><pubDate>Fri, 27 Jul 2018 11:31:26 +0800</pubDate><description><![CDATA[TMVPHelper源码地址：https://blog.youkuaiyun.com/wingichoy/article/details/52148695

插件下载：https://github.com/githubwing/MVPHelper



我们的BaseModel 和BaseView 可以不做任何操作但是BasePresenter需要代码：
 



/*
*   2018年7月3日 15:59...]]></description><category></category></item></channel></rss>