-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
208 changed files
with
8,730 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
## 外包集中营 ## | ||
|
||
整合多个软件外包平台项目信息,替你筛选优质项目 | ||
|
||
![MIT License](https://img.shields.io/github/license/mashape/apistatus.svg) ![api 15+](https://img.shields.io/badge/API-14%2B-green.svg) | ||
|
||
## About Us 关于我们 ## | ||
[![天宇工作室](https://github.com/ittianyu/MobileGuard/blob/master/read_me_images/logo-transparent.png?raw=true)](http://www.ittianyu.com) | ||
|
||
## 功能 ## | ||
- ### 首页 ### | ||
展示你关注的外包信息,比如: 移动app、网站开发、微信/小程序。 | ||
|
||
- ### 发现 ### | ||
展示所有的外包信息。 | ||
|
||
- ### 搜索 ### | ||
展示标题或描述中含有指定关键词的外包信息。 | ||
|
||
|
||
## 截图 ## | ||
|
||
![欢迎界面](/screenshots/splash.jpg) ![主界面](/screenshots/home.jpg) | ||
|
||
![主界面滑动](/screenshots/home_scroll.jpg) ![发现界面](/screenshots/find.jpg) | ||
|
||
![搜索界面](/screenshots/search.jpg) ![我的界面](/screenshots/mime.jpg) | ||
|
||
![没有数据界面](/screenshots/empty.jpg) ![错误界面](/screenshots/error.jpg) | ||
|
||
|
||
## 下载 ## | ||
|
||
已在 [百度手机助手](http://shouji.baidu.com/software/10867391.html)、[91市场](http://apk.91.com/Soft/Android/com.ittianyu.pocenter-1.html)、[安卓市场](http://apk.hiapk.com/appinfo/com.ittianyu.pocenter/1) 上线。 | ||
|
||
贴出二维码方便下载 | ||
![](http://d.hiphotos.bdimg.com/wisegame/pic/item/72dfa9ec8a136327b9c91278988fa0ec08fac752.jpg) | ||
|
||
## 技术点 ## | ||
|
||
- 框架:MVP | ||
- 网络访问:Retrofit2 + OkHttp3 | ||
- 网络缓存:RxCache | ||
- 数据及解析:Gson 解析 json | ||
- 异步框架:RxJava2 | ||
- 设计规范:Material Design | ||
- 界面布局:BottomNavigationView + ViewPager + Fragment | ||
- 第三方接入:ShareSdk、友盟 app 统计、TinkerPatch 热更新 | ||
|
||
## 亮点 ## | ||
|
||
- ViewPager 懒加载:在 Activity 生命周期内仅加载一次,且第一次可见时加载。 | ||
- LCEE 界面逻辑:也就是加载、内容、错误、空视图。 | ||
|
||
## 项目包结构 ## | ||
|
||
- com.ittianyu.pocenter | ||
- common             公用代码 | ||
- api               网络访问代码 | ||
- base               基类 | ||
- bean               实体类 | ||
- utils              工具类 | ||
- features            功能 | ||
- detail              详情 | ||
- find              发现 | ||
- home              主页 | ||
- mime              我的 | ||
- search              搜索 | ||
- type               标签管理 | ||
- version             版本更新 | ||
- MainActivity           主界面 | ||
- SplashActivity          欢迎界面 | ||
|
||
|
||
## 踩坑经历 ## | ||
|
||
- 混淆:如果项目中有用到 Gson 解析数据,不要混淆实体类。最好养成用一个库,就加上一个库的混淆代码的习惯。 | ||
|
||
## 开发体会 ## | ||
|
||
整个项目包括 服务器端、爬虫、app,但这里只开源了 app,主要是对其他端水平不自信,不想拿出来献丑。 | ||
难度不大,但一个人做难免觉得有点累(虽然我已经很久不敢说累了)。 | ||
虽说工作室有服务器端的,但不能让人家白干活。 | ||
本来还打算顺便做个网页版的,但愧于工作还没着落,所以决定先放一放。 | ||
|
||
## 致谢 ## | ||
|
||
感谢工作室的 UI大大 给与了关于配色方面的建议。 | ||
|
||
## 求职 ## | ||
|
||
最后这里打一个求职广告。 | ||
年后打算去深圳找份安卓开发的工作(预计可以从3月工作到8月底),如果哪位大佬看得上鄙人的 [简历](http://ittianyu.deercv.com/)(没写学校是怕被抓到开除了),请把公司名、地址、职位、薪资、面试时间发到我邮箱 [email protected] (最好支持远程面试)。 | ||
解释一下,本人大三,下学期没课(我没选课),但没实习政策,学校规定擅自离校会被开除。 | ||
各位大佬也别先骂我心急,因为学校没有明文实习政策,问过好多老师也说大四下学期完全没课了才能出去实习(毕设都要搞一个多月,实习个...),所以这是我毕业前最后一次机会。 | ||
|
||
## 授权 ## | ||
|
||
MIT License | ||
|
||
Copyright (c) 2017 ittianyu | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
// signingConfigs { | ||
// release { | ||
// keyAlias 'pocenter' | ||
// keyPassword 'xxx' | ||
// storeFile file('keystore.jks') | ||
// storePassword 'xxx' | ||
// } | ||
// } | ||
compileSdkVersion 25 | ||
buildToolsVersion "25.0.0" | ||
defaultConfig { | ||
applicationId "com.ittianyu.pocenter" | ||
minSdkVersion 14 | ||
targetSdkVersion 25 | ||
versionCode 1 | ||
versionName "1.0.0" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
multiDexEnabled true | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
// signingConfig signingConfigs.release// 使用签名 | ||
} | ||
} | ||
dataBinding { | ||
enabled true | ||
} | ||
android.defaultConfig.vectorDrawables.useSupportLibrary = true | ||
// 多渠道打包 | ||
// productFlavors { | ||
// tianyu {} | ||
// productFlavors.all { flavor -> | ||
// flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name] | ||
// } | ||
// } | ||
} | ||
|
||
// TinkerPatch 相关的配置 | ||
apply from: 'tinkerpatch.gradle' | ||
|
||
dependencies { | ||
compile fileTree(include: ['*.jar'], dir: 'libs') | ||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | ||
exclude group: 'com.android.support', module: 'support-annotations' | ||
}) | ||
compile 'com.android.support:appcompat-v7:25.1.0' | ||
testCompile 'junit:junit:4.12' | ||
// leakcanary | ||
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' | ||
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' | ||
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' | ||
// log | ||
compile 'com.orhanobut:logger:1.15' | ||
// http | ||
compile 'com.squareup.okhttp3:okhttp:3.4.1' | ||
compile 'com.squareup.okio:okio:1.10.0' | ||
// retrofit | ||
compile 'com.squareup.retrofit2:retrofit:2.1.0' | ||
compile 'com.squareup.retrofit2:converter-gson:2.1.0' | ||
// json | ||
compile 'com.google.code.gson:gson:2.7' | ||
// RxJava2 | ||
compile 'io.reactivex.rxjava2:rxjava:2.0.0' | ||
compile 'io.reactivex.rxjava2:rxandroid:2.0.0' | ||
compile 'org.reactivestreams:reactive-streams:1.0.0' | ||
// retrofit-adapter | ||
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0' | ||
// RxCache | ||
compile 'com.github.VictorAlbertos.RxCache:runtime:1.6.9-2.x' | ||
// To use Gson | ||
compile 'com.github.VictorAlbertos.Jolyglot:gson:0.0.3' | ||
// other | ||
compile 'com.github.ittianyu:BottomNavigationViewEx:1.1.2' | ||
// bottom navigation | ||
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.6.1' | ||
// recycler adapter | ||
compile 'com.github.ittianyu:mvp:0.0.1' | ||
// mvp | ||
compile 'com.github.githubwing:ByeBurger:1.2.3' | ||
// hide actionbar and bottom navigation | ||
compile 'com.zhy:flowlayout-lib:1.0.3' | ||
// flow tag | ||
compile 'com.victor:lib:1.0.4' | ||
// loading animation | ||
compile 'com.github.arimorty:floatingsearchview:2.0.3' | ||
// search view | ||
compile 'com.allenliu:checkversionlib:1.0.4' | ||
// check version | ||
// share sdk | ||
compile files('libs/MobCommons-2016.1222.1756.jar') | ||
compile files('libs/MobTools-2016.1222.1756.jar') | ||
compile files('libs/ShareSDK-Core-2.8.0.jar') | ||
compile files('libs/ShareSDK-Email-2.8.0.jar') | ||
compile files('libs/ShareSDK-QQ-2.8.0.jar') | ||
compile files('libs/ShareSDK-Wechat-2.8.0.jar') | ||
compile files('libs/ShareSDK-Wechat-Core-2.8.0.jar') | ||
compile files('libs/ShareSDK-Wechat-Favorite-2.8.0.jar') | ||
compile files('libs/ShareSDK-Wechat-Moments-2.8.0.jar') | ||
// share sdk end | ||
// 友盟统计 | ||
compile 'com.umeng.analytics:analytics:latest.integration' | ||
// TinkerPatch SDK | ||
compile 'com.tinkerpatch.sdk:tinkerpatch-android-sdk:1.1.0' | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in E:\Android\sdk/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
#http | ||
-dontwarn okhttp3.** | ||
-dontwarn okio.** | ||
-dontwarn retrofit2.Platform$Java8 | ||
|
||
#databinding | ||
-dontwarn android.databinding.** | ||
-keep class android.databinding.** { *; } | ||
-keep class android.databinding.annotationprocessor.** { *; } | ||
|
||
##---------------Begin: proguard configuration for Gson ---------- | ||
# Gson uses generic type information stored in a class file when working with fields. Proguard | ||
# removes such information by default, so configure it to keep all of it. | ||
-keepattributes Signature | ||
|
||
# For using GSON @Expose annotation | ||
-keepattributes *Annotation* | ||
|
||
# Gson specific classes | ||
-keep class sun.misc.Unsafe { *; } | ||
#-keep class com.google.gson.stream.** { *; } | ||
|
||
# Application classes that will be serialized/deserialized over Gson | ||
-keep class com.google.gson.examples.android.model.** { *; } | ||
|
||
# Prevent proguard from stripping interface information from TypeAdapterFactory, | ||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) | ||
-keep class * implements com.google.gson.TypeAdapterFactory | ||
-keep class * implements com.google.gson.JsonSerializer | ||
-keep class * implements com.google.gson.JsonDeserializer | ||
##---------------End: proguard configuration for Gson ---------- | ||
|
||
#友盟 | ||
-keepclassmembers class * { | ||
public <init> (org.json.JSONObject); | ||
} | ||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
|
||
#fastjson | ||
-dontwarn com.alibaba.fastjson.** | ||
-keep class com.alibaba.fastjson.** { *; } | ||
|
||
#rx cache | ||
-dontwarn io.rx_cache.internal.** | ||
-keepclassmembers enum io.rx_cache.Source { *; } | ||
-keep class io.rx_cache2.** { *; } | ||
|
||
# bottom navigation | ||
-keep public class android.support.design.widget.BottomNavigationView { *; } | ||
-keep public class android.support.design.internal.BottomNavigationMenuView { *; } | ||
-keep public class android.support.design.internal.BottomNavigationPresenter { *; } | ||
-keep public class android.support.design.internal.BottomNavigationItemView { *; } | ||
|
||
#beans | ||
-keep public class **.*Bean {*;} | ||
|
||
#指定压缩级别 | ||
-optimizationpasses 5 | ||
|
||
#不跳过非公共的库的类成员 | ||
-dontskipnonpubliclibraryclassmembers | ||
|
||
#混淆时采用的算法 | ||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | ||
|
||
#把混淆类中的方法名也混淆了 | ||
-useuniqueclassmembernames | ||
|
||
#优化时允许访问并修改有修饰符的类和类的成员 | ||
-allowaccessmodification | ||
|
||
#将文件来源重命名为“SourceFile”字符串 | ||
-renamesourcefileattribute SourceFile | ||
#保留行号 | ||
-keepattributes SourceFile,LineNumberTable | ||
|
||
#保持所有实现 Serializable 接口的类成员 | ||
-keepclassmembers class * implements java.io.Serializable { | ||
static final long serialVersionUID; | ||
private static final java.io.ObjectStreamField[] serialPersistentFields; | ||
private void writeObject(java.io.ObjectOutputStream); | ||
private void readObject(java.io.ObjectInputStream); | ||
java.lang.Object writeReplace(); | ||
java.lang.Object readResolve(); | ||
} | ||
|
||
#Fragment不需要在AndroidManifest.xml中注册,需要额外保护下 | ||
-keep public class * extends android.support.v4.app.Fragment | ||
-keep public class * extends android.app.Fragment | ||
|
||
# 保持测试相关的代码 | ||
-dontnote junit.framework.** | ||
-dontnote junit.runner.** | ||
-dontwarn android.test.** | ||
-dontwarn android.support.test.** | ||
-dontwarn org.junit.** |
26 changes: 26 additions & 0 deletions
26
app/src/androidTest/java/com/ittianyu/pocenter/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.ittianyu.pocenter; | ||
|
||
import android.content.Context; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumentation test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() throws Exception { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
assertEquals("com.ittianyu.pocenter", appContext.getPackageName()); | ||
} | ||
} |
Oops, something went wrong.