| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jeun4115
9年前发布

A foursquare client written entirely in kotlin

来自: https://github.com/chemouna/Nearby

A Simple Foursquare client written in kotlin

Demo

(click to view on 油Tube)

Features :

  • Display list of venues for a location.
  • Observe location changes and update venues list whenever a new location is detected.
  • Display a message informing the user that the app is going to fetch new venues because he/she had moved, with an action "Cancel" to cancel the update of venues.
  • Display of a venue item with its image, name, ratings and price.
  • Display a venue in a detailed view when a venue item is clicked.
  • Animating the display of detail view from the list of venues.
  • Support for Marshmallow permissions (Asking for each needed permission).

Implementation :

  • Implemented entirely in Kotlin.
  • Heavy use of Reactive paradigms (with RxJava, Retrofit and RxBindings).
  • Unit tests (with mocking of foursquare service).
  • Gradle dependencies organised in a maintainable way (dependencies.gradle).
  • Using an MVP structure.
  • Dependency injection with Dagger2.
  • Taking advantage of android build types to use a debug build for features such as logging that we don't want on release builds.
  • Testing: using Mocks with retrofit

Focus on:

Minimize mutability

  • Use val most of the time for immutability and minimise the use of var.

Idiomatic use of kotlin

  • Use extensions
  • Use apply
  • Use of kotlin higher order functions to have a LINQ-style code

Rx

  • Don't break the chain.

 本文由用户 jeun4115 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1455445891948.html
Kotlin