Architecting Android with RxJava

Overview

#RxWeather

##@Deprecated

简介

这是一个简单的天气预报项目,目的是用来演示如何使用RxJava构造一个清晰的Android应用框架,并且加入了Rxbus,为了节约时间成本,界面并没有经过特别的设计,配色和控件的摆放也没有遵循Material Design设计规范,所以,它并不具备一款Android App所应该具备的素质,为此,我深感抱歉和遗憾。

我写了一篇文章,对这个项目做更深入的描述和解释:

Architecting Android with RxJava

架构

Model View Presenter:

MVP-Architecture

The Clean Architecture:

Clean-Architecture

工程结构

  • presentation: Presenters、Views、Exceptions

  • usercase: UseCase

  • model: Service、Entities

  • common: Util、Constants、Event、RxBus、RxAndroid

公开API

使用百度地图获取位置信息。

使用和风天气公开接口,获取一周天气预报(暂不支持经纬度查询)。

使用Openweathermap提供的部分资料。

用法

首先,因为目前这个版本不支持分页加载,所以,没有提供上拉加载功能。

其次,除了HeaderView天气是根据当前位置获取之外,其余天气均通过读取domain module下的city.txt文件来获取一周内天气。

通过以下步骤进行修改或增加:

  1. 下载Openweathermap提供的资料city.list.json.gz这个文件,找到需要的城市json字符串,复制到city.txtcities数组中。

  2. 在和风天气提供的国内城市ID列表中,找到对应城市的ID进行替换。

最后,搜索功能,输入城市地区的时候,请不要以“市”、“区”结尾,例如:用“北京”代替“北京市”,“朝阳”代替“朝阳区”。

GIF

关于开发者

小鄧子的简书

小鄧子的慕课网专题

Follow me on Weibo

参考

You might also like...
Do's and Don'ts for Android development, by Futurice developers
Do's and Don'ts for Android development, by Futurice developers

Best practices in Android development Avoid reinventing the wheel by following these guidelines. Lessons learned from Android developers in Futurice.

A sample Android app which showcases advanced usage of Dagger among other open source libraries.
A sample Android app which showcases advanced usage of Dagger among other open source libraries.

U+2020 A sample Android app which showcases advanced usage of Dagger among other open source libraries. Watch the corresponding talk or view the slide

Proguard configurations for common Android libraries

android-proguard-snippets Example Proguard configurations for common Android libraries. This project assumes that your ProGuard configuration is based

Examples of Android applications

Android Demos This is a collection of basic android examples created by Novoda. CarouselFragment CompassExample ContactSelector CustomActivityTransiti

A simple chat demo for socket.io and Android

socket.io-android-chat This is a simple chat demo for socket.io and Android. You can connect to https://socket-io-chat.now.sh using this app. Installa

Google Play game services - Android samples

Google Play game services - Android Samples Copyright (C) 2014 Google Inc. Contents These are the Android samples for Google Play game services. Colle

Android common lib demo, include ImageCache, HttpCache, DropDownListView, DownloadManager, install apk silent and so on, you can find description
Android common lib demo, include ImageCache, HttpCache, DropDownListView, DownloadManager, install apk silent and so on, you can find description

android-demo 关于我,欢迎关注 微博:Trinea 主页:trinea.cn 邮箱:trinea.cn#gmail.com 微信:codek2 依赖:trinea-android-common android-auto-scroll-view-pager viewpager-indica

Cheat Sheet for Android Interviews
Cheat Sheet for Android Interviews

Android-Cheat-sheet Cheat Sheet for Android Interviews Topics Common Coding Programs Data Structure Coding Programs Android Interview Questions Java I

📚  Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Releases(0.2)
Owner
小鄧子
Android Developer
小鄧子
Learning RxJava for Android by example

Learning RxJava for Android by example This is a repository with real-world useful examples of using RxJava with Android. It usually will be in a cons

Kaushik Gopal 7.6k Dec 29, 2022
RxJava architecture library for Android

Reference Architecture for Android using RxJava This is an ambitious reference project of what can be done with RxJava to create an app based on strea

Reark 2.1k Dec 17, 2022
Viacheslav Veselov 0 Jul 8, 2022
Movie discovery app showcasing MVP, RxJava, Dagger 2 and Clean Architecture

MovieGuide ?? Refactoring in progress ??‍♀️ ⛏ ?? ??️ ?? ?? ?? Comments and new issues are welcome. ?? Currently not accepting external PRs that touch

Arun Sasidharan 2.6k Dec 25, 2022
Quality-Tools-for-Android 7.5 0.0 L5 Java This is an Android sample app + tests that will be used to work on various project to increase the quality of the Android platform.

Quality Tools for Android This is an Android sample app + tests that will be used to work on various project to increase the quality of the Android pl

Stéphane Nicolas 1.3k Dec 27, 2022
A simple app to showcase Androids Material Design and some of the cool new cool stuff in Android Lollipop. RecyclerView, CardView, ActionBarDrawerToggle, DrawerLayout, Animations, Android Compat Design, Toolbar

#Android-LollipopShowcase This is a simple showcase to show off Android's all new Material Design and some other cool new stuff which is (new) in Andr

Mike Penz 1.8k Nov 10, 2022
A simple app to showcase Androids Material Design and some of the cool new cool stuff in Android Lollipop. RecyclerView, CardView, ActionBarDrawerToggle, DrawerLayout, Animations, Android Compat Design, Toolbar

#Android-LollipopShowcase This is a simple showcase to show off Android's all new Material Design and some other cool new stuff which is (new) in Andr

Mike Penz 1.8k Nov 10, 2022
simple android grocery app using kotlin and android studio

Project Idea The idea of this project is to make a grocery android app that users can use to order the groceries they want. It doesn't contain any bac

null 0 Nov 29, 2021
Beetlebug is an open source insecure Android application with CTF challenges built for Android Penetration Testers and Bug Bounty hunters.

Beetlebug Beetlebug is a beginner-friendly Capture the Flag Android application that aims to inspire interest in Mobile Application Security. It is ge

Hafiz Abdulaziz 60 Oct 11, 2022