• Stars
    star
    696
  • Rank 65,018 (Top 2 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created about 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A application used to show technical information in every working days, use MVP pattern.

GankDaily

icon

每日提供技术干货的 App

下载

fir

酷安

干货数据源

应用中的所有干货数据均来自干货集中营

干货集中营是一个技术干货共享平台。每个工作日,网站都会分享一些技术干货信息,包括Android、iOS、App等技术干货,除此之外还有福利和休息视频可供你享用。 如果你是移动开发者,这个App一定很适合你。当然,如果你是一个宅男,也许你会对每天的福利更感兴趣。Enjoy it。

App设计

整个项目借鉴自 @drakeet 的妹纸。但是在原项目基础上, 自己在代码层面和UI层面上做了自己的修改。

UI设计

放弃使用瀑布式的妹子流做主页,转而让首页展示当天干货信息,更加注重干货内容(Content)的呈现, 如下所示,相比原妹纸项目,现在首屏只有一张福利图,如果觉得看的不过瘾,应用也提供了纯妹子视图入口,点击首页 右上角按钮,选择纯妹子,就可以看到所有的妹子们了,更加纯粹的妹子流。

gank_daily_introduce

代码设计

原项目使用 Retrofit+RxJava 的组合获取网络数据,再加上使用Lambda表达式,代码已经变得很精简,所以把获取数据的代码放在 Activity 中也不显得混乱, 但是作为一个有追求的程序员,既然已经知道有 MVP 这种架构模式可以解决项目分层的问题, 那为什么不试着使用 MVP 去对代码进行进一步的优化呢,所以整个项目使用了 MVP 架构,将所有的数据请求、业务逻辑都提取到 Presenter 层中。 使用 MVP 后需要为每一个 Activity 编写一个对应一个 Presenter(控制器)类,让 Activity 担当纯粹的 View 角色, 这样 Activity 就主要负责一些界面更新操作,具体的业务逻辑都交托给 Presenter 层处理,代码结构因此也变得更加清晰。

更多关于项目中对 MVP 模式的实践,这里自己整理了一篇博客进行详细介绍。

MVP 模式在 GankDaily 中的应用

依赖库

参考资料

Author

License

/*
 *       
 * Copyright (C) 2015 Drakeet <[email protected]>
 * Copyright (C) 2015 GuDong <[email protected]>
 *
 * Meizhi is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Meizhi is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Meizhi.  If not, see <http://www.gnu.org/licenses/>.
 */

More Repositories

1

TranslateApp

📝 A translations app without interruptions, copy words and translate directly, show result by top view.
Java
1,807
star
2

AppPlus

A open source android application, and used to manage app,export apk, watch recent processes.
Java
437
star
3

AwesomeArticles

🗃️ 收集看到的内容特别棒的技术文章并会配有一段个人短评
412
star
4

OneDrawable

✏️ Use only one image to set a background with a click effect for the View
Java
294
star
5

ReView

🎨 A view to help developers and designers view the View's font size, color, and border.
Java
237
star
6

AwesomeAndroidStudioPlugin

Collect awesome plugin for AndroidStudio in our develop life.
150
star
7

ViewController

📌 A view controller manages a set of views that make up a portion of your app’s user interface,it aims to make ui develop change more clear and flexible.(ViewControler 是一种界面开发组件化实现方式,利用它可以将一些复杂的 UI 界面开发组件化.)
Java
122
star
8

GankDagger2

When Meizi meet MVP + Dagger2 + Retrofit2
Java
57
star
9

liuye

柳叶清单开放 API 文档
32
star
10

ChinaShare

社交分享组件
Java
32
star
11

FlowerLoading

🌻 Android loading or progress view, just like iOS IndicatorView.
Java
31
star
12

LockScreenDemo

一个简单的Android 锁屏 demo实现
Java
22
star
13

PowerKey

模仿MIUI6 长按电源键的关机界面
Java
21
star
14

maoruibin.github.com

personal blog
JavaScript
21
star
15

TrendChartView

A custom sliding indicator view showing the air quality index(AQI) by hour( From MoWeather)
Java
11
star
16

HandlerAnalysis

9
star
17

ActionButton

Use TextView as a ActionButton with left icon
Java
8
star
18

pgy.flight

为内测分发平台蒲公英开发的 Android 客户端
Java
7
star
19

skills-learning-list

Everything can be learning
5
star
20

FreeNoteData

2
star
21

MaoAppBase

Kotlin
2
star
22

list

todo is funny
Vue
2
star
23

idea

那些一闪而过的好主意
2
star
24

xPic

1
star
25

awesome-background-music

collect awesome background musics
1
star