Kotlin Weekly 中文周报 —— 103

391

Kotlin Weekly 中文周报


  1. The requireActivity() and requireContext() example (android.jlelse.eu)
    Introduced in Support Library 27.1.0
    在支持库中引入 27.1.0

  2. (Online Talk) How Kotlin Interoperates with Java (attendee.gotowebinar.com)
    (在线谈话)Kotlin 如何与 Java 互动
    Attendees can connect with the author of Kotlin Programming in this online discussion. Free, signed copies of the book will be given away. Limited seats. Learn more & register.
    与会者可以在这个在线讨论中与 Kotlin 编程的作者联系。免费的,签名的书将被赠送。座位有限。学习更多和注册。

  3. Delegate your Lifecycle to Kotlin (blog.blueapron.io)
    将程序的生命周期委托给 Kotlin
    In this post by Prem Nirmal you'll learn how to leverage Kotlins property delegation to eliminate null checks in Fragments when dealing with lifecycle events.
    在 PremNirmal 的这篇文章中,你将学习如何利用 Kotlin 的财产代表团在处理生命周期事件时消除空的检查。

  4. From Java Builders to Kotlin DSLs (kotlinexpertise.com)
    从 Java Builders 到 Kotlin dsls
    DSLs – Domain Specific Languages – are an ever trending topic in Kotlin circles. They allow us to flex some of the most exciting language features while accomplishing more readable and maintainable solutions in our code. Learn how to wrap an existing Java Builder in Kotlin DSL in this article!
    DSLs- 领域特定语言 - 是一个在 Kotlin 圈子里的热门话题。它们允许我们在代码中实现更具可读性和可维护性的解决方案时,可以灵活地使用一些最令人激动的语言特性。了解如何在本文中包装现有的 Kotlin DSL 中的 Java Builder !

  5. When is “when” exhaustive? (medium.com)
    『什么时候』是详尽无遗的?
    Ataul Munim discovered something about using 'when' in Kotlin, and a new trick he learned related to it from the open source Plaid project.
    在 Kotlin,Aaul Munim 发现了一些关于使用『 when 』的东西,他从开放源码的格子项目中学习到了一个新的窍门。

  6. KDispatcher simple and light-weight event bus for Kotlin (medium.com)
    Kotlin 的简单轻量级事件总线
    In this introductionary blog post by Alexander Minkin you'll learn how to use the event bus library. There are more popular event buses (like Otto or EventBus from Greenrobot) in Android country but this one has been written in and especially for Kotlin.
    在这篇由 Alexander Minkin 介绍的博客文章中,你将学习如何使用事件总线库。在 Android 中有更多的热门事件巴士(如 Otto 或 Eventbus),但这一个已经被写入了,特别是 Kotlin。

  7. A true companion: exploring Kotlin’s companion objects (medium.com)
    一个真正的伴侣:探索 Kotlin 的同伴对象
    Companion objects are at a first glance a simple Kotlin structure. But they can do more than you think. Curious? Then click on the above link.
    伴侣对象是一个简单的 Kotlin 结构的第一眼。但他们能做的比你想象的要多。好奇吗?然后点击上面的链接。

  8. Annotations for your Java-friendly Kotlin code (medium.com)
    Java 友好的 Kotlin 代码注释
    Even if you are a Kotliner, chances are you keep a relationship or affair with Java. Do you know you can make your Kotlin code more Java-friendly with some Annotations? Check out some of them in this article.
    即使你是一个 Kotlin 开发者,你也有可能与 Java 保持关系或暧昧关系。你知道你可以让你的 Kotlin 代码更多的 Java 友好的一些注释吗?看看这篇文章中的一些吧。

  9. Looping in Kotlin (medium.com)
    Kotlin 中的循环 Loop everywhere! Check in this article the various way of loop control in Kotlin, starting from the very classic way, to iterating through collections, to new functional approaches, etc.
    到处都是循环!在这篇文章中,从非常经典的方式开始,通过集合,到新的功能性方法等等,在 Kotlin 中的各种循环控制方式。

  10. Writing your first Detekt rule (medium.com)
    写你的第一个 detekt 规则
    Detekt is a static analyze tool for the Kotlin language. It’s open source, in active development and friendly to firs…
    Detekt 是 Kotlin 语言的静态分析工具。它的开放源码,在积极发展和友好的 firs …

  11. Opening the Koin 1.0.0 — Beta version (medium.com)
    打开 Koin 1.0.0 版 -Beta 版
    Hi Koin users! This is it … we are releasing the first public beta version of Koin 1.0.0. Lots of work have been done…
    高科用户!这就是……我们发布了第一个公测版本的 Koin 1.0.0。许多工作已经完成…

  12. Headers, Interceptors and Authenticators with Retrofit (medium.com)
    带改进的头、拦截器和验证器
    In Android sometimes you need to add a couple of parameters, like headers, to make a successful request, this is a normal behavior from all the Android Apps, when you are using Retrofit, you can do it in multiple ways 在 Android 中,有时你需要添加一些参数,比如标题,才能成功发出请求,这是所有 Android 应用程序的正常行为,当你使用 Retrofit 时,你可以通过多种方式实现。。。。。。

  13. Cloud Continuous Integration on Android with Kotlin Project (proandroiddev.com)
    Android 与 Kotlin 项目的云持续集成
    This article shows you how to add Continuous Integration (CI) with tests, a code coverage report, and to display CI and coverage reports in the README.md file of the project.
    本文向您展示了如何在项目的 Readme.md 文件中添加连续集成(CI)和测试、代码覆盖报告以及显示 CI 和覆盖报告。

  14. Data Driven Testing with KotlinTest (proandroiddev.com)
    Kotlintest 数据驱动测试
    In this article Stephen Samuel covers how to write data-driven tests using the KotlinTest library while also introducing some nice extra features.
    在本文中,Stephen Samuel 介绍了如何使用 KotlinTest 库编写数据驱动测试,同时还介绍了一些不错的额外功能。

  15. Model-View-Intent & Data Binding (proandroiddev.com)
    模型视图意图和数据绑定
    I always try to simplify development process and reduce boilerplate code, therefore I decided to dive deeper into MVI.
    我总是尽量简化开发过程,减少样板代码,因此我决定深入到 MVI。

  16. Moving Your Gradle Build Scripts to Kotlin (pspdfkit.com)
    将你的 gradle 构建脚本移动到 Kotlin
    In this blog post, David Schreiber-Ranner introduces Kotlin in yet another area of Android development: Gradle build scripts.
    在这篇博客文章中,David Schreiber Ranner 在 Android 开发的另一个领域介绍了 Kotlin:Gradle 构建脚本。

  17. AMA at Reddit with the Android P Engineering Team (reddit.com)
    AMA 在 Reddit 与 Android P 工程团队
    The Android P Engineering Team participated in an AMA at Reddit, and they hold some thoughts and ideas about Kotlin/Native.
    安卓 P 工程团队在 Reddit 上参加了一个 AMA,他们对 Kotlin /Native 持有一些想法和想法。

  18. ketro (smilecs.github.io)
    Simple and sane Retrofit LiveData request library for Kotlin. Propagate errors to the parent fragment/activity without losing your sanity.
    简单和健全的改造 LiveData 请求库为 Kotlin。将错误传播到父片段 / 活动,而不会失去理智。

  19. Taking part and growing a Kotlin Community (talkingkotlin.com)
    参与和发展 Kotlin 社区
    Hadi Hariri talks with Brent Watson about his involvement and background in Kotlin, as well as starting a Kotlin meet-up, getting people to participate and lessons learned.
    哈迪 · 哈里里与布伦特 · 沃特森就他在科特林的参与和背景进行了会谈,并开始了一场 Kotlin 的聚会,让人们参与进来并吸取教训。

  20. From Java to Kotlin beyond Alt+Shift+Cmd+K (vimeo.com)
    从 Java 到 Kotlin 超越 ALT+SHIFT+CMD+K
    In this talk Fabio Collini shows how to use some Kotlin features (for example data classes, collections, coroutines, and delegates) to simplify Android development comparing the code with the equivalent “modern” Java code.
    在本文中,法比奥 Collini 展示了如何使用一些 Kotlin 特性(例如数据类、集合、coroutines 和委托)来简化 Android 开发,将代码与等效的『现代』 Java 代码进行比较。

  21. kotlintest (github.com)
    A flexible and comprehensive testing tool for Kotlin.
    一个灵活和全面的测试工具,依赖于 Kotlin。

  22. SdkSearch (github.com)
    Jake Wharton's Android app and Chrome extension for searching the Android SDK documentation written in Kotlin.
    Jake Wharton 的 Android 应用程序和 Chrome 扩展用于搜索在 Kotlin 写的 Android SDK 文档。

  23. KDispatcher (github.com)
    Simple and light-weight event dispatcher for Kotlin
    Kotlin 简单轻量级事件调度器


文章主要来源:

  1. Android Weekly - 319
  2. Kotlin Weekly - 103
  3. Kotlin Weekly Update — 48

关于我:微博简书掘金Github