Android Weekly Notes Issue #228

Android Weekly Issue #228

October 23rd, 2016
Android Weekly Issue #228html

本期內容包括:
Android 7.1的App Shortcuts; Searchbar的設計討論; Nougat的Direct Reply; Alarms API討論; Support Library的BottomNavigationView; MVVM模式; Dagger2的subcomponent實現; Test Rules介紹等.android

ARTICLES & TUTORIALS

Android 7.1 Static Shortcut

Exploring Android Nougat 7.1 App Shortcuts

這兩篇文章都在介紹Android 7.1的App Shortcuts.git

本博客相關文章: Android 7.1 App Shortcuts使用 .github

比起點擊一個search icon, 而後進入搜索屏, 用戶更喜歡一個search bar, 而後直接就能夠在主屏上進行搜索.api

做者對於他們的應用想到的解決方式就是, 在主屏上放一個search bar,而後 用一個transition, 把主屏和搜索屏(兩個Activity)銜接起來, 這樣用戶在點擊search bar以後, 不會感受到他們打開了一個新屏.app

另外一個效果就是, 在點擊search bar以後, 當前屏fade away, search bar展開, 在第二屏直接打開鍵盤, 用戶能夠進行搜索.ssh

Code: Material-SearchTransition.mvvm

Nougat - Direct Reply

Direct Reply是指用戶能夠直接回復Notification, 而不用打開app.
這篇文章做者示例瞭如何實如今message app中用Direct Reply清除消息和直接回復.工具

Da Real Fragmentation - Alarms

做者這篇文章先是詳細介紹了Alarm的各個選項和使用情形, 以及它的API版本變化.佈局

Bottom Navigation View in the Design Support Library

在Design Support Library 25.0.0中, Google發佈了Bottom Navigation的官方實現: BottomNavigationView.
這篇文章寫了如何使用這個View, 而且最後列出了一些第三方庫.

Shades of MVVM

做者討論了MVVM模式及它的幾種變形.

Activities Subcomponents Multibinding in Dagger 2

dagger-2.7 添加了@Modules.subcomponents.
本文演示瞭如何用這個更好地添加子ActivityComponent. 而不用每次都藉助AppComponent. 這樣作除了解耦以外, 對於測試時頗有幫助.

例子代碼: Dagger2Recipes-ActivitiesMultibinding

Experimenting with TensorFlow on Android Part 1

TensorFlow是一個Machine Intelligence開源庫, 主要的用途是數據計算, deep learning等.

bazel是一個build tool, 功能相似於gradle.

本文講了如何setup.

Understanding Test Rules

Espresso中的Rule是如何工做的呢?
以前有一個文章: Using Rules To Influence JUnit Test Execution說明JUnit中的Rule是如何工做的.

而後做者講了如何自定義一個TestRule.

DESIGN

Sketch template for app shortcuts

做者分享了爲Android 7.1的app shortcuts功能而準備的sketch模板.

LIBRARIES & CODE

PageIndicatorView

Page Indicator, 結合Android ViewPager使用的, 轉換時有點點鏈接的功能.

PermissionUtil

一個Android 6.0 permission請求的庫.

DeviceAnimationTestRule

一個JUnit rule, 用來disable和enable設備動畫.

DiagonalLayout

對角線佈局, 感受怪怪的.

NEWS

Android 7.1 Developer Preview

Android 7.1發了Developer Preview啦.
官網Overview在這裏: Android 7.1 for Developers

ConstraintLayout beta 1 is now available

ConstraintLayout beta 1發佈啦.

TOOLS

Learn You a Git

教你學習Git的工具.

相關文章
相關標籤/搜索