自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

KKkeep的专栏

Helping others is helping himself

  • 博客(27)
  • 资源 (2)
  • 问答 (2)
  • 收藏
  • 关注

原创 你真的了解kotlin中协程的suspendCoroutine原理吗?

你真的了解suspendCoroutine吗?在Kotlin协程中,如何让一个suspned 函数挂起?如何让挂起协程恢复?

2023-05-30 17:20:06 1647

原创 带你详细了解 Android Lifecycle

Lifecycle 一个跟踪组件生命周期的东西

2023-04-05 13:59:56 1406

原创 SafeIterableMap

SafeIterableMap 他是google工程师在 Androidx 中提供的一个简单数据结构,非线程安全,以键值对方式存取数据,看似一个map,其底层是一个双向链表,每一个键值对被包装成一个 Entry 被保存。支持双向遍历,并且支持在迭代过程中直接对集合的修改(直接调用map的put 或者remove方法,比如添加删除,不能调用Iteratorr的remove方法)。

2023-03-24 17:22:00 472 1

原创 Android Studio 打造一个适合自己开发环境-- Distraction Free Mode

Distraction Free Mode In the distraction-free mode, the editor occupies the entire IntelliJ IDEA frame, without any editor tabs and tool-window buttons. The code is center-aligned. To swit...

2018-06-29 14:32:43 2229

原创 Android layer-list 中图片被拉伸问题

无图无真相,先上图: 其中 item 1~5 是正正常的,后面本来应该显示在右下角的icon 都被拉伸了。 代码如下:<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:reader="http...

2018-06-22 09:51:40 11044

原创 Android Studio 插件无法下载或者无法浏览

如果你遇到以下情况:Browse Repositories 窗口中无法加载出来插件,也无法搜索能在Browse Repositories 中搜索到插件,但是点击 install 后无法现在那么你可以尝试一下修改: 只需要在 File->Settings->Apparence & Behavior->System Settings->Update...

2018-06-08 20:39:00 1525 2

原创 Java 泛型之-协变&逆变

首先,Java有泛型这一个概念,初衷是为了保证在运行时出现的错误能提早放到编译时检查。有了这个前提,再来看看题主的问题。先说一下java中的协变,逆变,不可变:假设有如下类:class Food{} // 默认继承Objectclass Fruit extends Food{}class Meat extends Food {}class Apple extends F...

2018-03-08 11:48:44 5772 5

原创 @TypeQualifierDefault

@TypeQualifierDefault: This qualifier is applied to an annotation to denote that the annotation defines a default type qualifier that is visible within the scope of the element it is applied to.@...

2018-02-27 14:46:47 851

原创 @TypeQualifierNickname

@TypeQualifierNickname: This annotation is applied to a annotation, and marks the annotation as being a qualifier nickname. Applying a nickname annotation X to a element Y should be interpreted as ha...

2018-02-27 11:46:12 1887 1

原创 @TypeQualifier

@TypeQualifier: This qualifier is applied to an annotation to denote that the annotation should be treated as a type qualifier.@Documented@Target(value=ANNOTATION_TYPE)@Retention(value=RUNTIME)...

2018-02-27 11:44:48 510

原创 Type Qualifier

在编程语言中,类型限定符(Type Qualifier)是一个关键之,用于修饰 类型(type)。维基百科中的解释: In the C, C++, and D programming languages, a type qualifier is a keyword that is applied to a type, resulting in a qualified type. For...

2018-02-27 11:43:09 806

转载 第一类公民(First-class Citizen)

转至:概念理解#1 第一类公民(First-class Citizen)In programming language design, a first-class citizen (also object, entity, or value) in a given programming language is an entity which supports all the operatio

2018-01-09 14:29:49 2445

原创 Android Studio Gradle: Implementation vs API dependency

升级到Android Studio 3.0 后有没有发现编译项目的速度提高了?为什么会这样呢?是因为Stuido 3.0 中支持了 Gradle plugin 3.0, Gradle plugin 3.0 在 dependencise 块中为我们带了一下新的API:compile 被api 所代替。provided被compileOnly 代替apk 被runtimeOnly代替引入了新的i

2018-01-03 16:24:46 1571 1

翻译 Java 中字段和变量的的区别(Fields vs Variables in Java)

转载至:http://edayan.info/java/fields-vs-variables-in-javaFields vs Variables in JavaFields vs Variables in JavaWhat is a fieldDifferent types of variablesClass variablesInstance variablesLocal varia

2017-12-21 10:20:44 1901 1

原创 Android 一次启动多个Activity (TaskStackBuilder)

引言startActivitysTaskStackBuilder引言在什么场景下我么需要一次启动多个Activity 呢?一般来说用的最多的还是notification。点击一个notification,启动App 内的某一个TargetActivity,在TargetActivity界面 按back button 或者其他方式 把TargetActivity finish掉后不会返回到Home

2017-09-21 17:37:07 8111

原创 Vim YouCompleteMe Mac OS C family 系统库函数不能自动补全

之前还好好的,升级Xcode 和 command tools 后突然发现 YouCompleteMe 不能对c 语言库函数(printf 等)自动补全了,以及出现对 NULL 等 宏定义提示未定义等情况,折腾了一上午,各种搜索,最终还是在官方文档上找到了答案,在此记录一下, 也希望能帮助其他遇到这个问题的人。确认.ycm_extra_conf.py 路径时候配对了: let g:ycm_

2017-09-20 17:44:39 2586 1

原创 Activity 启动模式

FlagFLAG_ACTIVITY_NEW_DOCUMENTFLAG_ACTIVITY_MULTIPLE_TASKFLAG_ACTIVITY_RETAIN_IN_RECENTSFlagFLAG_ACTIVITY_NEW_DOCUMENT 此处document 这个单词实在是不知道怎么翻译才恰当,document 本意就是文档,文件的意思,本文展示就翻译成文档的意思吧,我觉得这样稍微准确一点

2017-09-13 17:09:20 1440 1

原创 Android: 通过 intent 启动 Activity

通过 intent 启动 ActivityIntent 种类Exported 属性Category总结Explicit Intent 启动 ActivityImplicit Intent 启动Activity通过 intent 启动 ActivityIntent 种类 Intent 有两种: Explicit intents 显示意图 通过指定明确的包名和类名来启动一

2017-09-01 12:01:26 879

原创 Android 通过inputstream 加载非Drawable 文件夹下的 .9 path 图片

有时候我们想在其他地方加载 .9 path 图片,比如 assets 目录下,又或者从网上下载一个到sdcard 上,但是 bitmap.getNinePatchChunk() 总是 return null,而如果9path图片在drawable 文件下则可以。为什么会这样呢?是因为9path 图片有两种type,一种叫“source” 一种叫“compiled”. “source” 就是我们通过

2015-08-17 15:29:18 2125

转载 Android Matrix

http://www.cnblogs.com/qiengo/archive/2012/06/30/2570874.htmlMatrix的数学原理平移变换旋转变换缩放变换错切变换对称变换代码验证 Matrix的数学原理在Android中,如果你用Matrix进行过图像处理,那么一定知道Matrix这个类。Andr

2015-06-08 14:45:53 574

原创 Android Service

Services A Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and

2015-04-02 14:15:20 705

原创 Android 进程 和 线程 Process and Threads

官方文档 : Process and Threads 本文主要是参考官方文档翻译而来并加入了一些自己开发过程的理解 When an application component starts and the application does not have any other components running, the Android system starts a new Linux p

2015-03-31 15:35:18 1317

原创 Android Actionar overflow 不显示的问题

关于Android Actionar overflow 不显示的问题

2015-03-17 11:40:30 690

原创 Android System.exit(code) and android.os.Process.killProcess(pid)或者发生RunTimeException 导致应用重启

关于 System.exit(code) and android.os.Process.killProcess(pid) 或者发生RunTimeException导致应用重启 的问题

2015-01-09 19:08:40 4183 1

原创 Android WebView 闪屏问题

Android WebView 闪屏问题

2015-01-07 15:09:59 5028 1

原创 Android Bitmap.setDensity(int density) 和 BitmapDrawable.setTargetDensity()

关于Android Bitmap.setDensity 和BitmapDrawable.setTargetDensity() 的作用:   Bitmap.setDensity:api文档时这样解释的:Specifies the density for this bitmap.  When the bitmap is drawn to a Canvas that also has a

2015-01-06 12:33:28 6835 1

原创 Android-App manifest-allowTaskReparenting

Whether or not the activity can move from the task that started it to the task it has an affinity for when that task is next brought to the front — "true" if it can move, and "false" if it must remain with the task where it started.

2014-12-22 19:48:59 947

Kotlin Channel 发送接收代码执行Xmind版流程图

Kotlin Channel 发送接收代码执行流程图

2023-06-05

Android 一次启动多个Activity (TaskStackBuilder)

点击通知启动多个Activity.从启动Activity 返回不会退出app,而是返回到App 的MainActivity 或者其他Activity

2017-09-28

TestAllowTaskReparenting

android AllowTaskReparenting 属性 demo

2014-12-23

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除