Browse Source

first init

回忆 5 years ago
parent
commit
06e6a12406
76 changed files with 2467 additions and 0 deletions
  1. 11 0
      .gitignore
  2. 29 0
      .idea/codeStyles/Project.xml
  3. 6 0
      .idea/vcs.xml
  4. 1 0
      app/.gitignore
  5. 36 0
      app/build.gradle
  6. 21 0
      app/proguard-rules.pro
  7. 26 0
      app/src/androidTest/java/com/show/ExampleInstrumentedTest.java
  8. 23 0
      app/src/main/AndroidManifest.xml
  9. 48 0
      app/src/main/java/com/show/App.java
  10. 88 0
      app/src/main/java/com/show/AppError.java
  11. 110 0
      app/src/main/java/com/show/AppManager.java
  12. 120 0
      app/src/main/java/com/show/Constants.java
  13. 158 0
      app/src/main/java/com/show/base/BaseActivity.java
  14. 88 0
      app/src/main/java/com/show/base/BaseFragment.java
  15. 117 0
      app/src/main/java/com/show/ui/MainActivity.java
  16. 50 0
      app/src/main/java/com/show/ui/SecondActivity.java
  17. 29 0
      app/src/main/java/com/show/ui/fragment/FirstFragment.java
  18. 54 0
      app/src/main/java/com/show/ui/fragment/FiveFragment.java
  19. 54 0
      app/src/main/java/com/show/ui/fragment/FourFragment.java
  20. 53 0
      app/src/main/java/com/show/ui/fragment/SecondFragment.java
  21. 61 0
      app/src/main/java/com/show/ui/fragment/ThirdFragment.java
  22. 34 0
      app/src/main/res/drawable-v24/ic_launcher_foreground.xml
  23. 170 0
      app/src/main/res/drawable/ic_launcher_background.xml
  24. 28 0
      app/src/main/res/layout/activity_main.xml
  25. 15 0
      app/src/main/res/layout/activity_second.xml
  26. 15 0
      app/src/main/res/layout/fragment.xml
  27. 70 0
      app/src/main/res/layout/title_normal.xml
  28. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  29. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  30. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.png
  31. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  32. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher.png
  33. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  34. BIN
      app/src/main/res/mipmap-xhdpi/bg_title.png
  35. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher.png
  36. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  37. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_3_new.png
  38. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_default_1.png
  39. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_default_2.png
  40. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_default_4.png
  41. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_default_5.png
  42. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_select_1.png
  43. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_select_2.png
  44. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_select_4.png
  45. BIN
      app/src/main/res/mipmap-xhdpi/icon_main_bottom_select_5.png
  46. BIN
      app/src/main/res/mipmap-xhdpi/icon_title_back.png
  47. BIN
      app/src/main/res/mipmap-xhdpi/main_bottom_bg.png
  48. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  49. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  50. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  51. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  52. 6 0
      app/src/main/res/values/colors.xml
  53. 8 0
      app/src/main/res/values/dimens.xml
  54. 4 0
      app/src/main/res/values/strings.xml
  55. 11 0
      app/src/main/res/values/styles.xml
  56. 17 0
      app/src/test/java/com/show/ExampleUnitTest.java
  57. 32 0
      build.gradle
  58. 14 0
      gradle.properties
  59. 172 0
      gradlew
  60. 84 0
      gradlew.bat
  61. 1 0
      library/.gitignore
  62. 96 0
      library/build.gradle
  63. 21 0
      library/proguard-rules.pro
  64. 26 0
      library/src/androidTest/java/com/library/ExampleInstrumentedTest.java
  65. 2 0
      library/src/main/AndroidManifest.xml
  66. 5 0
      library/src/main/java/com/library/Constans.java
  67. 37 0
      library/src/main/java/com/library/weight/bottombar/AFragment.java
  68. 29 0
      library/src/main/java/com/library/weight/bottombar/MyViewPagerAdapter.java
  69. 31 0
      library/src/main/java/com/library/weight/bottombar/NoTouchViewPager.java
  70. 131 0
      library/src/main/java/com/library/weight/bottombar/SpecialTab.java
  71. 121 0
      library/src/main/java/com/library/weight/bottombar/SpecialTabRound.java
  72. 35 0
      library/src/main/res/layout/special_tab.xml
  73. 38 0
      library/src/main/res/layout/special_tab_round.xml
  74. 3 0
      library/src/main/res/values/strings.xml
  75. 17 0
      library/src/test/java/com/library/ExampleUnitTest.java
  76. 1 0
      settings.gradle

+ 11 - 0
.gitignore

@@ -0,0 +1,11 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches/build_file_checksums.ser
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild

+ 29 - 0
.idea/codeStyles/Project.xml

@@ -0,0 +1,29 @@
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <Objective-C-extensions>
+      <file>
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
+      </file>
+      <class>
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
+        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
+      </class>
+      <extensions>
+        <pair source="cpp" header="h" fileNamingConvention="NONE" />
+        <pair source="c" header="h" fileNamingConvention="NONE" />
+      </extensions>
+    </Objective-C-extensions>
+  </code_scheme>
+</component>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 1 - 0
app/.gitignore

@@ -0,0 +1 @@
+/build

+ 36 - 0
app/build.gradle

@@ -0,0 +1,36 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 28
+    defaultConfig {
+        applicationId "com.show"
+        minSdkVersion 16
+        targetSdkVersion 28
+        versionCode 1
+        versionName "1.0"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+        exclude group: 'com.android.support', module: 'support-annotations'
+    })
+    implementation 'com.android.support:appcompat-v7:28.0.0'
+    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+    testImplementation 'junit:junit:4.12'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+    //依赖库
+    compile project(path: ':library')
+    //butterknife
+    implementation 'com.jakewharton:butterknife:8.6.0'
+    annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
+}

+ 21 - 0
app/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# 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 *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 0
app/src/androidTest/java/com/show/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.show;
+
+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.*;
+
+/**
+ * Instrumented 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() {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("com.show", appContext.getPackageName());
+    }
+}

+ 23 - 0
app/src/main/AndroidManifest.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.show">
+
+    <application
+        android:name=".App"
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme">
+        <activity android:name=".ui.MainActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name=".ui.SecondActivity" />
+    </application>
+
+</manifest>

+ 48 - 0
app/src/main/java/com/show/App.java

@@ -0,0 +1,48 @@
+package com.show;
+
+import android.app.Application;
+import android.content.Context;
+
+
+/**
+ * Created by Administrator on 2018/12/25 0025.
+ */
+
+public class App extends Application {
+
+    private static Context mContext;
+//    private static SPUtil mSputil;
+//    private static Api api;
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+        mContext = getApplicationContext();
+//        mSputil = new SPUtil(this);
+//        api = new Api(this);
+        new AppError().initUncaught();
+//        ToastUtil.register(this);
+//        Glide.get(this).register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(Api.getOkHttpClient()));
+
+
+//        HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory(null, null, null);
+//        OkHttpClient okHttpClient = new OkHttpClient.Builder()
+//                .sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager)
+//                //其他配置
+//                .build();
+//        OkHttpUtils.initClient(okHttpClient);
+    }
+
+//    public static Api getApi() {
+//        return api;
+//    }
+//
+//    public static SPUtil getSputil() {
+//        return mSputil;
+//    }
+
+    public static Context getContext() {
+        return mContext;
+    }
+
+}

+ 88 - 0
app/src/main/java/com/show/AppError.java

@@ -0,0 +1,88 @@
+package com.show;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Date;
+
+/**
+ * Created by WE-WIN-027 on 2016/6/20.
+ *
+ * @des ${TODO}
+ */
+public class AppError implements Thread.UncaughtExceptionHandler {
+
+    private static final String TAG = "AppError";
+    protected boolean isSendEmail = false;
+
+    //系统默认的UncaughtException处理类
+    protected Thread.UncaughtExceptionHandler mDefaultHandler;
+
+    /*初始化*/
+    public void initUncaught() {
+        //获取系统默认的UncaughtException处理器
+        mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler();
+        //设置该CrashHandler为程序的默认处理器
+        Thread.setDefaultUncaughtExceptionHandler(this);
+    }
+
+    /*当UncaughtException发生时会转入该函数来处理*/
+    @Override
+    public void uncaughtException(Thread thread, Throwable ex) {
+        if (!handleException(ex) && mDefaultHandler != null) {
+            //如果用户没有处理则让系统默认的异常处理器来处理
+            mDefaultHandler.uncaughtException(thread, ex);
+        } else {
+            try {
+                Thread.sleep(3000);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+                //AppException.exc(e).makeToast(AppContext.getContext());
+            }
+            //退出程序
+            AppManager.getAppManager().appExit(App.getContext());
+        }
+    }
+
+    /**
+     * 自定义错误处理,收集错误信息 发送错误报告等操作均在此完成.
+     *
+     * @param ex
+     * @return true:如果处理了该异常信息;否则返回false.
+     */
+    private boolean handleException(Throwable ex) {
+        if (ex == null) {
+            return false;
+        }
+//        ToastUtil.showToast("很抱歉,程序出现异常,即将退出.");
+        if(isSendEmail){
+            sendErrorInfoMail(ex);
+        }
+        //保存日志文件
+        saveErrorLog(ex);
+        return true;
+    }
+
+    public void sendErrorInfoMail(Throwable ex){
+        StringBuffer sb = new StringBuffer();
+        sb.append("--------------------"+(new Date().toLocaleString())+"---------------------\n");
+        Writer writer = new StringWriter();
+        PrintWriter printWriter = new PrintWriter(writer);
+        ex.printStackTrace(printWriter);
+        Throwable cause = ex.getCause();
+        while (cause != null) {
+            cause.printStackTrace(printWriter);
+            cause = cause.getCause();
+        }
+        printWriter.close();
+        String result = writer.toString();
+        sb.append(result);
+
+    }
+    /**
+     * 保存异常日志
+     */
+    public void saveErrorLog(Throwable ex) {
+
+    }
+}

+ 110 - 0
app/src/main/java/com/show/AppManager.java

@@ -0,0 +1,110 @@
+package com.show;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.app.ActivityManager;
+import android.content.Context;
+
+import java.util.Stack;
+
+/**
+ * 应用程序Activity管理类:用于Activity管理和应用程序退出
+ */
+public class AppManager {
+
+    private static Stack<Activity> activityStack;
+    private static AppManager instance;
+
+    private AppManager() {
+    }
+
+    /**
+     * 单一实例
+     */
+    public static AppManager getAppManager() {
+        if (instance == null) {
+            instance = new AppManager();
+        }
+        return instance;
+    }
+
+    /**
+     * 添加Activity到堆栈
+     */
+    public void addActivity(Activity activity) {
+        if (activityStack == null) {
+            activityStack = new Stack<Activity>();
+        }
+        activityStack.add(activity);
+    }
+
+    /**
+     * 获取当前Activity(堆栈中最后一个压入的)
+     */
+    public Activity currentActivity() {
+        Activity activity = activityStack.lastElement();
+        return activity;
+    }
+
+    /**
+     * 结束当前Activity(堆栈中最后一个压入的)
+     */
+    public void finishActivity() {
+        Activity activity = activityStack.lastElement();
+        finishActivity(activity);
+    }
+
+    /**
+     * 结束指定的Activity
+     */
+    public void finishActivity(Activity activity) {
+        if (activity != null) {
+            activityStack.remove(activity);
+            activity.finish();
+            activity = null;
+        }
+    }
+
+    /**
+     * 结束指定类名的Activity
+     */
+    public void finishActivity(Class<?> cls) {
+        for (Activity activity : activityStack) {
+            if (activity.getClass().equals(cls)) {
+                finishActivity(activity);
+            }
+        }
+    }
+
+    /**
+     * 结束所有Activity
+     */
+    public void finishAllActivity() {
+        for (int i = 0, size = activityStack.size(); i < size; i++) {
+            if (null != activityStack.get(i)) {
+                activityStack.get(i).finish();
+            }
+        }
+        activityStack.clear();
+    }
+
+    /**
+     * 退出应用程序
+     */
+    @SuppressLint("MissingPermission")
+    public void appExit(Context context) {
+        try {
+            finishAllActivity();
+            ActivityManager activityMgr =
+                    (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+            activityMgr.killBackgroundProcesses(context.getPackageName());
+            System.exit(0);
+        } catch (Exception e) {
+        }
+    }
+
+    public boolean isAppExit() {
+        return activityStack == null || activityStack.isEmpty();
+    }
+
+}

+ 120 - 0
app/src/main/java/com/show/Constants.java

@@ -0,0 +1,120 @@
+package com.show;
+
+/**
+ * Created by Administrator on 2018/12/25 0025.
+ */
+
+public class Constants {
+
+    public static final int OK = 0;
+    public static final String BASE_URL = "https://ws01.library.sh.cn/mservices/";
+    public static final String LH_LOG_PATH = "/Log/";
+    public static final int TOKEN_EXPIRED = 0;
+    public static final String ORGNAME = "shlib";
+
+    //上海图书馆地址location : sl
+    public static final String COLLECTION_LOCATION_SL = "sl";
+    //忘记密码页面
+    public static final String URL_FORGET_PWD = "https://passport.library.sh.cn:4430/rs/register/getpass_index";
+    //咨询
+    public static final String URL_CONSULT = "http://shlibrary.faqrobot.cn/robot/h5chat.html?sysNum=148997688742318882&tdsourcetag=s_pctim_aiomsg";
+    //帮助中心
+    public static final String URL_HELP_CENTER = "file:///android_asset/web/help.html";
+    //APP更新地址
+    public static final String UPDATE_URL = "https://ws01.library.sh.cn/epubfile/apps/shlib.app.android.xml";
+    //    public static final String UPDATE_URL = "http://www.we-win.com.cn/shlibrary/shlib.app.android.xml";
+    //馆藏信息图书状态
+    public static final String COLLECTION_BOOK_STATUS_I = "i";//归还
+    public static final String COLLECTION_BOOK_STATUS_DMG = "dmg";//破损
+    public static final String COLLECTION_BOOK_STATUS_O = "o";//借出
+    public static final String COLLECTION_BOOK_STATUS_T = "t";//编目中
+    public static final String COLLECTION_BOOK_STATUS_M = "m";//馆藏丢失
+    //馆藏信息资料类型
+    public static final String COLLECTION_TYPE_PJ = "pj";//普通外借资料
+    public static final String COLLECTION_TYPE_BS = "bs";//保存资料
+    public static final String COLLECTION_TYPE_EW = "ew";//少儿外借资料
+    public static final String COLLECTION_TYPE_YL = "yl";//仅供阅览资料
+    public static final String COLLECTION_TYPE_CJ = "cj";//参考外借资料
+
+    public static String app_key = "shlib.app.android.shl.v1";
+    public static String app_value = "41D3A45EB355B2EAFA8F9D2F00BBF0B2FC5FD488";
+    //重用的参数
+    public static String appid = "shlib.app.android.shl.v1";
+    public static String TYPE_AAT = "aat";
+    public static String TYPE_UAT = "uat";
+    public static String TYPE_UAT_1 = "uat_1";
+    public static String TYPE_UAT_7 = "uat_7";
+    public static String APP_NAME = "shlib";
+    //接口APIId
+    public static final String SEARCH_APIID = "shlib.solr.search";
+    public static final String DETAIL_APIID = "shlib.books.infobyids";
+    public static final String COLLECTION_APIID = "shlib.bookcollection";
+    public static final String BANNER_APIID = "shlib.serverinfo.carouselfigure";
+    public static final Object LOSSANDFIND_APPID = "shlib.auth.lossandfind";
+    public static final Object NEAR_LIBARAY_APPID = "shlib.libs.info";
+    public static final Object LIBARAY_DETAIL_APPID = "shlib.libs.libidinfo";
+    public static final Object MESSAGE_LIST_APPID = "shlib.app.message.getlist";
+    public static final Object MESSAGE_UNREAD_COUNT_APPID = "shlib.app.message.getunread";
+    public static final  Object MESSAGE_DETAIL_APPID = "shlib.app.message.info";
+    public static final  Object MESSAGE_DELETE_APPID = "shlib.app.message.delete";
+    public static final  Object MESSAGE_READ_ALL_APPID = "shlib.app.message.markread";
+    public static final  Object DEVICE_REGISTER_APPID = "shlib.app.push.reg";
+    public static final  Object UN_BIND_DEVICE_APPID = "shlib.app.push.regcancel";
+
+    //消息状态 0 已读 1 未读 3 已删除
+    public static final String MSG_READ = "0";
+    public static final String MSG_UN_READ = "1";
+    public static final String MSG_DEL = "2";
+    //消息类型 0 公告 1个人
+    public static final String MSG_TYPE_1 = "0";
+    public static final String MSG_TYPE_2 = "1";
+
+
+    //从哪个页面跳转到登录页面
+    // 0,fragment1 1、读书证 2、我的 3 续借图书 4 收件箱
+    public static final int GO_LOGIN_FROME_0 = 0;
+    public static final int GO_LOGIN_FROME_1 = 1;
+    public static final int GO_LOGIN_FROME_2 = 2;
+    public static final int GO_LOGIN_FROME_3 = 3;
+    public static final int GO_LOGIN_FROME_4 = 4;
+
+    //intent code
+    //首页消息
+    public static final int REQUEST_CODE_FRAGMENT_MSG = 10000;
+    public static final int RESULT_CODE_FRAGMENT_MSG = 10001;
+    //首页续借图书
+    public static final int REQUEST_CODE_BORROWED_BOOK = 10002;
+    public static final int RESULT_CODE_BORROWED_BOOK = 10003;
+    //读者证
+    public static final int REQUEST_CODE_READER_CARD = 10004;
+    public static final int RESULT_CODE_READER_CARD = 10005;
+    //我的
+    public static final int REQUEST_CODE_MINE = 10006;
+    public static final int RESULT_CODE_MINE = 10007;
+    //设置页面
+    public static final int REQUEST_CODE_SETTING = 10008;
+    public static final int RESULT_CODE_SETTING = 10009;
+
+    //Method
+    public static String METHON_NORMAL = "token_acquire";
+    public static String METHON_REFRESH = "token_refresh";
+
+    public static int UAT_ERR = 10012;
+
+    //图书封面前缀
+    public static final String BOOK_IMG_PREFIX = "http://218.1.116.99/Image/servlet/ImageServlet?bib=";
+
+    //HTML前缀
+    public static final String webview_pre = "<!DOCTYPE html>\n" +
+            "<html lang=\"en\">\n" +
+            "<head>\n" +
+            "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no\">\n" +
+            "    <title>Document</title>\n" +
+            "</head>\n" +
+            "<body>";
+
+    //HTML后缀
+    public static final String webview_und = "</body>\n" +
+            "</html>";
+
+}

+ 158 - 0
app/src/main/java/com/show/base/BaseActivity.java

@@ -0,0 +1,158 @@
+package com.show.base;
+
+import android.content.Intent;
+import android.net.ParseException;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.ImageView;
+
+import com.google.gson.JsonParseException;
+import com.gyf.barlibrary.ImmersionBar;
+import com.show.AppManager;
+import com.show.Constants;
+import com.show.R;
+import com.vector.update_app.UpdateAppBean;
+import com.vector.update_app.UpdateAppManager;
+import com.vector.update_app.UpdateCallback;
+
+import org.json.JSONException;
+
+import java.net.ConnectException;
+import java.net.SocketTimeoutException;
+import java.net.UnknownHostException;
+
+import butterknife.ButterKnife;
+import me.yokeyword.fragmentation.SupportActivity;
+import retrofit2.HttpException;
+
+
+/**
+ * Created by WE-WIN-027 on 2016/9/27.
+ *
+ * @des ${TODO}
+ */
+public abstract class BaseActivity extends SupportActivity {
+
+    public ImmersionBar mImmersionBar;
+
+//    SPUtil mSPUtil;
+//    UserStorage mUserStorage;
+    protected int page = 1;
+    protected int pageSize = 20;
+//    LoadingDialog mLoadingDialog;
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        initTheme();
+        super.onCreate(savedInstanceState);
+        setContentView(initContentView());
+        setStatusBar();
+        ButterKnife.bind(this);
+        initUiAndListener();
+        AppManager.getAppManager().addActivity(this);
+    }
+
+    public void setStatusBar() {
+        mImmersionBar = ImmersionBar.with(this);
+        mImmersionBar.transparentStatusBar()  //透明状态栏,不写默认透明色
+                .statusBarDarkFont(false)   //状态栏字体是深色,不写默认为亮色
+                .statusBarDarkFont(false, 0f)
+                .flymeOSStatusBarFontColorInt(getResources().getColor(R.color.white))
+                .init();
+    }
+
+    private void initTheme() {
+
+    }
+
+    public void showLoading() {
+//        mLoadingDialog = LoadingDialog.show(this, "");
+    }
+
+    public void hideLoading() {
+//        if (mLoadingDialog != null && mLoadingDialog.isShowing()) {
+//            mLoadingDialog.dismiss();
+//        }
+    }
+
+
+    /**
+     * 设置view
+     */
+    public abstract int initContentView();
+
+    /**
+     * init UI && Listener
+     */
+    public abstract void initUiAndListener();
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (item.getItemId() == android.R.id.home) {
+            finish();
+            return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        AppManager.getAppManager().finishActivity(this);
+        if (mImmersionBar != null) {
+            mImmersionBar.destroy();
+        }
+    }
+
+    /**
+     * 打开新的Activity
+     *
+     * @param cls
+     */
+    public void openActivity(Class<?> cls) {
+        startActivity(new Intent(this, cls));
+    }
+
+    /**
+     * 设置返回键
+     *
+     * @param imageView
+     */
+    public void setImgBack(ImageView imageView) {
+        imageView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                finish();
+            }
+        });
+    }
+
+    public void loadError(Throwable throwable) {
+
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+    }
+
+
+    /**
+     * 检查版本更新
+     */
+    public void checkUpdate() {
+
+    }
+}

+ 88 - 0
app/src/main/java/com/show/base/BaseFragment.java

@@ -0,0 +1,88 @@
+package com.show.base;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import butterknife.ButterKnife;
+import me.yokeyword.fragmentation.SupportFragment;
+
+
+/**
+ * Created by WE-WIN-027 on 2016/9/27.
+ *
+ * @des ${TODO}
+ */
+public abstract class BaseFragment extends SupportFragment {
+
+    protected BaseActivity baseActivity;
+    protected View rootView;
+//    LoadingDialog mLoadingDialog;
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        rootView = (ViewGroup) inflater.inflate(initContentView(), null);
+        ButterKnife.bind(this, rootView);
+        if (rootView != null) {
+            ViewGroup parent = (ViewGroup) rootView.getParent();
+            if (parent != null) {
+                parent.removeView(rootView);
+            }
+        }
+        if (getActivity() instanceof BaseActivity) {
+            baseActivity = (BaseActivity) getActivity();
+        }
+        return rootView;
+    }
+
+    @Override
+    public void onViewCreated(View view, Bundle savedInstanceState) {
+        getBundle(getArguments());
+        initUI(view);
+        initData();
+        super.onViewCreated(view, savedInstanceState);
+    }
+
+    public void openActivity(Class<?> cls) {
+        startActivity(new Intent(baseActivity, cls));
+    }
+
+    public abstract int initContentView();
+
+    /**
+     * 得到Activity传进来的值
+     */
+    public abstract void getBundle(Bundle bundle);
+
+    /**
+     * 初始化控件
+     */
+    public abstract void initUI(View view);
+
+    /**
+     * 在监听器之前把数据准备好
+     */
+    public abstract void initData();
+
+    public void showLoading() {
+//        mLoadingDialog = LoadingDialog.show(getActivity(), "");
+    }
+
+    public void hideLoading() {
+//        if (mLoadingDialog != null && mLoadingDialog.isShowing()) {
+//            mLoadingDialog.dismiss();
+//        }
+    }
+
+
+    public void loadError(Throwable throwable) {
+
+    }
+
+    public void onRefresh() {
+
+    }
+
+}

+ 117 - 0
app/src/main/java/com/show/ui/MainActivity.java

@@ -0,0 +1,117 @@
+package com.show.ui;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.text.TextUtils;
+
+import com.library.weight.bottombar.MyViewPagerAdapter;
+import com.library.weight.bottombar.NoTouchViewPager;
+import com.library.weight.bottombar.SpecialTab;
+import com.library.weight.bottombar.SpecialTabRound;
+import com.show.App;
+import com.show.Constants;
+import com.show.R;
+import com.show.base.BaseActivity;
+import com.show.ui.fragment.FirstFragment;
+import com.show.ui.fragment.FiveFragment;
+import com.show.ui.fragment.FourFragment;
+import com.show.ui.fragment.SecondFragment;
+import com.show.ui.fragment.ThirdFragment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import me.majiajie.pagerbottomtabstrip.NavigationController;
+import me.majiajie.pagerbottomtabstrip.PageNavigationView;
+import me.majiajie.pagerbottomtabstrip.item.BaseTabItem;
+import me.majiajie.pagerbottomtabstrip.listener.SimpleTabItemSelectedListener;
+
+public class MainActivity extends BaseActivity {
+
+    @BindView(R.id.viewPager)
+    NoTouchViewPager viewPager;
+    @BindView(R.id.pageNavigationView)
+    PageNavigationView mPageNavigationView;
+
+    NavigationController navigationController;
+    private List<Fragment> mFragments;
+
+    @Override
+    public int initContentView() {
+        return R.layout.activity_main;
+    }
+
+    @Override
+    public void initUiAndListener() {
+        initFragments();
+        initBottomBar();
+        checkUpdate();
+    }
+
+    /**
+     * 初始化底部栏
+     */
+    private void initBottomBar() {
+        navigationController = mPageNavigationView.custom()
+                .addItem(newItem(R.mipmap.icon_main_bottom_default_1, R.mipmap.icon_main_bottom_select_1, "first", false))
+                .addItem(newItem(R.mipmap.icon_main_bottom_default_2, R.mipmap.icon_main_bottom_select_2, "second", false))
+                .addItem(newItem(R.mipmap.icon_main_bottom_3_new, R.mipmap.icon_main_bottom_3_new, "third", true))
+                .addItem(newItem(R.mipmap.icon_main_bottom_default_4, R.mipmap.icon_main_bottom_select_4, "four", false))
+                .addItem(newItem(R.mipmap.icon_main_bottom_default_5, R.mipmap.icon_main_bottom_select_5, "five", false))
+                .build();
+        viewPager.setAdapter(new MyViewPagerAdapter(getSupportFragmentManager(), mFragments));
+        //        navigationController.setupWithViewPager(viewPager);
+
+        navigationController.addSimpleTabItemSelectedListener(new SimpleTabItemSelectedListener() {
+            @Override
+            public void onSelected(int index, int old) {
+                if (index == 2 ) {
+                    openActivity(SecondActivity.class);
+                } else {
+                    viewPager.setCurrentItem(index);
+                }
+            }
+        });
+    }
+
+    /**
+     * 正常tab
+     */
+    private BaseTabItem newItem(int drawable, int checkedDrawable, String text, boolean isRound) {
+        if (isRound) {
+            SpecialTabRound mainTab = new SpecialTabRound(this);
+            mainTab.initialize(drawable, checkedDrawable, text);
+            mainTab.setTextDefaultColor(0xFF888888);
+            mainTab.setTextCheckedColor(0xFF4068fa);
+            return mainTab;
+        } else {
+            SpecialTab mainTab = new SpecialTab(this);
+            mainTab.initialize(drawable, checkedDrawable, text);
+            mainTab.setTextDefaultColor(0xFF888888);
+            mainTab.setTextCheckedColor(0xFF4068fa);
+            return mainTab;
+        }
+    }
+
+    /**
+     * 初始化页面
+     */
+    private void initFragments() {
+        mFragments = new ArrayList<>();
+        mFragments.add(new FirstFragment());
+        mFragments.add(new SecondFragment());
+        mFragments.add(new ThirdFragment());
+        mFragments.add(new FourFragment());
+        mFragments.add(new FiveFragment());
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // TODO: add setContentView(...) invocation
+        ButterKnife.bind(this);
+    }
+}

+ 50 - 0
app/src/main/java/com/show/ui/SecondActivity.java

@@ -0,0 +1,50 @@
+package com.show.ui;
+
+import android.os.Bundle;
+import android.widget.ImageView;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.show.R;
+import com.show.base.BaseActivity;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+public class SecondActivity extends BaseActivity {
+    @BindView(R.id.img_scan)
+    ImageView imgScan;
+    @BindView(R.id.ly_back)
+    RelativeLayout lyBack;
+    @BindView(R.id.tv_title)
+    TextView tvTitle;
+    @BindView(R.id.tv_right)
+    TextView tvRight;
+    @BindView(R.id.img_right)
+    ImageView imgRight;
+    @BindView(R.id.rl_right)
+    RelativeLayout rlRight;
+
+    @Override
+    public int initContentView() {
+        return R.layout.activity_second;
+    }
+
+    @Override
+    public void initUiAndListener() {
+        tvTitle.setText("Second");
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // TODO: add setContentView(...) invocation
+        ButterKnife.bind(this);
+    }
+
+    @OnClick(R.id.ly_back)
+    public void onViewClicked() {
+        finish();
+    }
+}

+ 29 - 0
app/src/main/java/com/show/ui/fragment/FirstFragment.java

@@ -0,0 +1,29 @@
+package com.show.ui.fragment;
+
+import android.os.Bundle;
+import android.view.View;
+
+import com.show.R;
+import com.show.base.BaseFragment;
+
+public class FirstFragment extends BaseFragment {
+    @Override
+    public int initContentView() {
+        return R.layout.fragment;
+    }
+
+    @Override
+    public void getBundle(Bundle bundle) {
+
+    }
+
+    @Override
+    public void initUI(View view) {
+
+    }
+
+    @Override
+    public void initData() {
+
+    }
+}

+ 54 - 0
app/src/main/java/com/show/ui/fragment/FiveFragment.java

@@ -0,0 +1,54 @@
+package com.show.ui.fragment;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.show.R;
+import com.show.base.BaseFragment;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+
+public class FiveFragment extends BaseFragment {
+    @BindView(R.id.tv_text)
+    TextView tvText;
+    Unbinder unbinder;
+
+    @Override
+    public int initContentView() {
+        return R.layout.fragment;
+    }
+
+    @Override
+    public void getBundle(Bundle bundle) {
+
+    }
+
+    @Override
+    public void initUI(View view) {
+
+    }
+
+    @Override
+    public void initData() {
+        tvText.setText("我的页面");
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        // TODO: inflate a fragment view
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        unbinder = ButterKnife.bind(this, rootView);
+        return rootView;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        unbinder.unbind();
+    }
+}

+ 54 - 0
app/src/main/java/com/show/ui/fragment/FourFragment.java

@@ -0,0 +1,54 @@
+package com.show.ui.fragment;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.show.R;
+import com.show.base.BaseFragment;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+
+public class FourFragment extends BaseFragment {
+    @BindView(R.id.tv_text)
+    TextView tvText;
+    Unbinder unbinder;
+
+    @Override
+    public int initContentView() {
+        return R.layout.fragment;
+    }
+
+    @Override
+    public void getBundle(Bundle bundle) {
+
+    }
+
+    @Override
+    public void initUI(View view) {
+
+    }
+
+    @Override
+    public void initData() {
+        tvText.setText(getString(R.string.txt_four));
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        // TODO: inflate a fragment view
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        unbinder = ButterKnife.bind(this, rootView);
+        return rootView;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        unbinder.unbind();
+    }
+}

+ 53 - 0
app/src/main/java/com/show/ui/fragment/SecondFragment.java

@@ -0,0 +1,53 @@
+package com.show.ui.fragment;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.show.R;
+import com.show.base.BaseFragment;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+
+public class SecondFragment extends BaseFragment {
+    @BindView(R.id.tv_text)
+    TextView tvText;
+    Unbinder unbinder;
+
+    @Override
+    public int initContentView() {
+        return R.layout.fragment;
+    }
+
+    @Override
+    public void getBundle(Bundle bundle) {
+
+    }
+
+    @Override
+    public void initUI(View view) {
+    }
+
+    @Override
+    public void initData() {
+        tvText.setText("第二个页面");
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        // TODO: inflate a fragment view
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        unbinder = ButterKnife.bind(this, rootView);
+        return rootView;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        unbinder.unbind();
+    }
+}

+ 61 - 0
app/src/main/java/com/show/ui/fragment/ThirdFragment.java

@@ -0,0 +1,61 @@
+package com.show.ui.fragment;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.show.R;
+import com.show.base.BaseFragment;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+
+public class ThirdFragment extends BaseFragment {
+    @BindView(R.id.tv_text)
+    TextView tvText;
+    Unbinder unbinder;
+
+    @Override
+    public int initContentView() {
+        return R.layout.fragment;
+    }
+
+    @Override
+    public void getBundle(Bundle bundle) {
+
+    }
+
+    @Override
+    public void initUI(View view) {
+
+    }
+
+    @Override
+    public void initData() {
+        tvText.setText("点击我");
+    }
+
+    @OnClick(R.id.tv_text)
+    public void click(){
+        Toast.makeText(getActivity(),"这是第三个页面",Toast.LENGTH_SHORT).show();
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        // TODO: inflate a fragment view
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        unbinder = ButterKnife.bind(this, rootView);
+        return rootView;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        unbinder.unbind();
+    }
+}

File diff suppressed because it is too large
+ 34 - 0
app/src/main/res/drawable-v24/ic_launcher_foreground.xml


+ 170 - 0
app/src/main/res/drawable/ic_launcher_background.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportWidth="108"
+    android:viewportHeight="108">
+    <path
+        android:fillColor="#008577"
+        android:pathData="M0,0h108v108h-108z" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M9,0L9,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,0L19,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,0L29,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,0L39,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,0L49,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,0L59,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,0L69,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,0L79,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M89,0L89,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M99,0L99,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,9L108,9"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,19L108,19"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,29L108,29"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,39L108,39"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,49L108,49"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,59L108,59"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,69L108,69"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,79L108,79"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,89L108,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,99L108,99"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,29L89,29"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,39L89,39"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,49L89,49"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,59L89,59"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,69L89,69"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,79L89,79"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,19L29,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,19L39,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,19L49,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,19L59,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,19L69,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,19L79,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+</vector>

+ 28 - 0
app/src/main/res/layout/activity_main.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <com.library.weight.bottombar.NoTouchViewPager
+        android:id="@+id/viewPager"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginBottom="45dp"/>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="91dp"
+        android:background="@mipmap/main_bottom_bg"
+        android:layout_alignParentBottom="true">
+
+        <me.majiajie.pagerbottomtabstrip.PageNavigationView
+            android:id="@+id/pageNavigationView"
+            android:layout_width="match_parent"
+            android:layout_height="80dp"
+            android:layout_alignParentBottom="true"
+            android:background="@android:color/transparent"/>
+
+    </RelativeLayout>
+
+</RelativeLayout>

+ 15 - 0
app/src/main/res/layout/activity_second.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+    <include layout="@layout/title_normal"/>
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:gravity="center"
+        android:text="这是第二个activity"/>
+</LinearLayout>

+ 15 - 0
app/src/main/res/layout/fragment.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+<TextView
+    android:id="@+id/tv_text"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:text="第一个页面"/>
+
+</LinearLayout>

+ 70 - 0
app/src/main/res/layout/title_normal.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="64dp"
+    android:background="@mipmap/bg_title"
+    android:gravity="center_vertical"
+    android:paddingBottom="@dimen/dp8"
+    android:paddingRight="@dimen/dp15"
+    android:paddingTop="@dimen/dp25">
+
+    <RelativeLayout
+        android:id="@+id/ly_back"
+        android:layout_width="50dp"
+        android:layout_height="match_parent"
+        android:paddingLeft="@dimen/dp15"
+        android:gravity="center_vertical"
+        android:orientation="vertical">
+
+        <ImageView
+            android:id="@+id/img_scan"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@mipmap/icon_title_back"/>
+
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <TextView
+            android:id="@+id/tv_title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"
+            android:maxLines="1"
+            android:ellipsize="end"
+            android:layout_marginLeft="36dp"
+            android:gravity="center"
+            android:layout_marginRight="36dp"
+            android:textColor="@color/white"
+            android:textSize="@dimen/sp16"/>
+
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:id="@+id/rl_right"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:layout_alignParentRight="true"
+        android:gravity="center">
+
+        <TextView
+            android:id="@+id/tv_right"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"
+            android:textColor="@color/white"
+            android:textSize="@dimen/sp14"/>
+
+        <ImageView
+            android:id="@+id/img_right"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"/>
+
+    </RelativeLayout>
+
+</RelativeLayout>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xhdpi/bg_title.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_3_new.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_default_1.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_default_2.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_default_4.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_default_5.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_select_1.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_select_2.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_select_4.png


BIN
app/src/main/res/mipmap-xhdpi/icon_main_bottom_select_5.png


BIN
app/src/main/res/mipmap-xhdpi/icon_title_back.png


BIN
app/src/main/res/mipmap-xhdpi/main_bottom_bg.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 6 - 0
app/src/main/res/values/colors.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#008577</color>
+    <color name="colorPrimaryDark">#00574B</color>
+    <color name="colorAccent">#D81B60</color>
+</resources>

+ 8 - 0
app/src/main/res/values/dimens.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <dimen name="dp8">8dp</dimen>
+    <dimen name="dp15">15dp</dimen>
+    <dimen name="dp25">25dp</dimen>
+    <dimen name="sp16">16sp</dimen>
+    <dimen name="sp14">14sp</dimen>
+</resources>

+ 4 - 0
app/src/main/res/values/strings.xml

@@ -0,0 +1,4 @@
+<resources>
+    <string name="app_name">show</string>
+    <string name="txt_four">第四个页面</string>
+</resources>

+ 11 - 0
app/src/main/res/values/styles.xml

@@ -0,0 +1,11 @@
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
+        <!-- Customize your theme here. -->
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+        <item name="colorAccent">@color/colorAccent</item>
+    </style>
+
+</resources>

+ 17 - 0
app/src/test/java/com/show/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.show;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() {
+        assertEquals(4, 2 + 2);
+    }
+}

+ 32 - 0
build.gradle

@@ -0,0 +1,32 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+    
+    repositories {
+        maven { url 'https://maven.google.com' }
+        google()
+        jcenter()
+        maven { url 'https://dl.bintray.com/umsdk/release' }
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.2.0'
+        
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+        maven { url 'https://maven.google.com' }
+        maven { url "https://jitpack.io" }
+        maven { url 'https://dl.bintray.com/umsdk/release' }
+    }
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 14 - 0
gradle.properties

@@ -0,0 +1,14 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+

+ 172 - 0
gradlew

@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"

+ 84 - 0
gradlew.bat

@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 1 - 0
library/.gitignore

@@ -0,0 +1 @@
+/build

+ 96 - 0
library/build.gradle

@@ -0,0 +1,96 @@
+apply plugin: 'com.android.library'
+
+android {
+    compileSdkVersion 26
+
+
+
+    defaultConfig {
+        minSdkVersion 16
+        targetSdkVersion 26
+        versionCode 1
+        versionName "1.0"
+
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+
+    }
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+
+}
+configurations {
+    all*.exclude group: 'com.android.support', module: 'support-v13'
+}
+dependencies {
+    def retrofitVersion = '2.3.0'
+    implementation fileTree(include: ['*.jar'], dir: 'libs')
+    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+        exclude group: 'com.android.support', module: 'support-annotations'
+    })
+    testImplementation 'junit:junit:4.12'
+    implementation 'com.android.support:appcompat-v7:26.1.0'
+    compile 'com.android.support:support-v4:26.1.0'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
+    implementation 'me.majiajie:pager-bottom-tab-strip:2.3.0'
+    compile 'com.android.support:recyclerview-v7:26.1.0'
+    compile 'com.android.support:design:26.1.0'
+    //fragmentation
+    compile 'me.yokeyword:fragmentation:1.1.6'
+    //rx
+    compile 'io.reactivex.rxjava2:rxjava:2.1.1'
+    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
+    compile 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
+    //network
+    compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
+    compile "com.squareup.retrofit2:converter-gson:$retrofitVersion"
+    compile "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
+    compile 'com.squareup.okhttp3:logging-interceptor:3.8.1'
+    // 处理常用的编码方法的工具类包
+    compile 'commons-codec:commons-codec:1.10'
+    compile 'com.jakewharton.timber:timber:4.5.1'
+    //get set
+    compileOnly 'org.projectlombok:lombok:1.16.16'
+    annotationProcessor "org.projectlombok:lombok:1.16.16"
+    //状态栏颜色修改
+    compile 'com.gyf.barlibrary:barlibrary:2.2.9'
+    //dagger
+    provided 'javax.annotation:javax.annotation-api:1.2'
+    //底部栏
+    compile 'me.majiajie:pager-bottom-tab-strip:+'
+    //按钮显示数字 https://github.com/qstumn/BadgeView
+    compile 'q.rorbin:badgeview:1.1.3'
+    //banner https://github.com/youth5201314/banner
+    compile 'com.youth.banner:banner:1.4.10'
+    //最新版本
+    //    图片加载依赖
+    compile 'com.github.bumptech.glide:glide:3.7.0'
+    compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
+    //拉刷新
+    compile 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-18'
+    compile 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-alpha-18'
+    //没有使用特殊Header,可以不加这行
+    //popwindow
+    compile 'com.example.zhouwei.library:library:1.0.0'
+    /*扫描 https://github.com/yuzhiqiang1993/zxing*/
+    compile 'com.github.yuzhiqiang1993:zxing:2.2.5'
+    compile 'com.yongyu.tabLayoutHelper:library:1.0.0'
+    //权限
+    compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'
+    compile 'org.jsoup:jsoup:1.10.1'
+    implementation 'com.afollestad.material-dialogs:core:0.9.1.0'
+    implementation 'com.afollestad.material-dialogs:commons:0.9.1.0'
+    compile 'com.github.chrisbanes:PhotoView:1.2.5'
+    compile 'com.just.agentweb:agentweb:4.0.2'
+    compile 'com.lcodecorex:tkrefreshlayout:1.0.7'
+    //版本更新
+    compile 'com.qianwen:update-app:3.5.2'
+    //okhttputils
+//    compile 'com.qianwen:okhttp-utils:3.8.0'
+    compile 'com.zhy:okhttputils:2.6.2'
+}

+ 21 - 0
library/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# 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 *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 0
library/src/androidTest/java/com/library/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.library;
+
+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.*;
+
+/**
+ * Instrumented 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() {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("com.library.test", appContext.getPackageName());
+    }
+}

+ 2 - 0
library/src/main/AndroidManifest.xml

@@ -0,0 +1,2 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.library" />

+ 5 - 0
library/src/main/java/com/library/Constans.java

@@ -0,0 +1,5 @@
+package com.library;
+
+public class Constans {
+    //放一些常用的常量值
+}

+ 37 - 0
library/src/main/java/com/library/weight/bottombar/AFragment.java

@@ -0,0 +1,37 @@
+package com.library.weight.bottombar;
+
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+
+public class AFragment extends Fragment {
+    private static final String ARG_C = "content";
+
+    public static AFragment newInstance(String content) {
+        Bundle args = new Bundle();
+        args.putString(ARG_C, content);
+        AFragment fragment = new AFragment();
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Nullable
+    @Override
+    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        String content = getArguments().getString(ARG_C);
+        TextView textView = new TextView(getContext());
+        textView.setTextSize(30);
+        textView.setGravity(Gravity.CENTER);
+        textView.setText(String.format("Test\n\n%s", content));
+        textView.setBackgroundColor(0xFFececec);
+        return textView;
+    }
+}

+ 29 - 0
library/src/main/java/com/library/weight/bottombar/MyViewPagerAdapter.java

@@ -0,0 +1,29 @@
+package com.library.weight.bottombar;
+
+
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentPagerAdapter;
+
+import java.util.List;
+
+
+public class MyViewPagerAdapter extends FragmentPagerAdapter {
+
+    List<Fragment> fragments;
+
+    public MyViewPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
+        super(fm);
+        this.fragments = fragments;
+    }
+
+    @Override
+    public Fragment getItem(int position) {
+        return fragments.get(position);
+    }
+
+    @Override
+    public int getCount() {
+        return fragments==null?0:fragments.size();
+    }
+}

+ 31 - 0
library/src/main/java/com/library/weight/bottombar/NoTouchViewPager.java

@@ -0,0 +1,31 @@
+package com.library.weight.bottombar;
+
+import android.content.Context;
+import android.support.v4.view.ViewPager;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+
+/**
+ * 使ViewPager不能滑动
+ */
+public class NoTouchViewPager extends ViewPager {
+
+    public NoTouchViewPager(Context context) {
+        super(context);
+    }
+
+    public NoTouchViewPager(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onInterceptTouchEvent(MotionEvent event) {
+        return false;
+    }
+
+}

+ 131 - 0
library/src/main/java/com/library/weight/bottombar/SpecialTab.java

@@ -0,0 +1,131 @@
+package com.library.weight.bottombar;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.support.annotation.ColorInt;
+import android.support.annotation.DrawableRes;
+import android.support.annotation.Nullable;
+import android.support.v4.content.ContextCompat;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.library.R;
+
+import me.majiajie.pagerbottomtabstrip.internal.RoundMessageView;
+import me.majiajie.pagerbottomtabstrip.item.BaseTabItem;
+
+/**
+ * Created by mjj on 2017/6/3
+ */
+public class SpecialTab extends BaseTabItem {
+
+    private ImageView mIcon;
+    private final TextView mTitle;
+    private final RoundMessageView mMessages;
+
+    private Drawable mDefaultDrawable;
+    private Drawable mCheckedDrawable;
+
+    private int mDefaultTextColor = 0x56000000;
+    private int mCheckedTextColor = 0x56000000;
+
+    private boolean mChecked;
+
+    public SpecialTab(Context context) {
+        this(context, null);
+    }
+
+    public SpecialTab(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public SpecialTab(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+
+        LayoutInflater.from(context).inflate(R.layout.special_tab, this, true);
+
+        mIcon = findViewById(R.id.icon);
+        mTitle = findViewById(R.id.title);
+        mMessages = findViewById(R.id.messages);
+    }
+
+    @Override
+    public void setOnClickListener(@Nullable OnClickListener l) {
+        View view = getChildAt(0);
+        if (view != null) {
+            view.setOnClickListener(l);
+        }
+    }
+
+    /**
+     * 方便初始化的方法
+     *
+     * @param drawableRes        默认状态的图标
+     * @param checkedDrawableRes 选中状态的图标
+     * @param title              标题
+     */
+    public void initialize(@DrawableRes int drawableRes, @DrawableRes int checkedDrawableRes, String title) {
+        mDefaultDrawable = ContextCompat.getDrawable(getContext(), drawableRes);
+        mCheckedDrawable = ContextCompat.getDrawable(getContext(), checkedDrawableRes);
+        mTitle.setText(title);
+    }
+
+    @Override
+    public void setChecked(boolean checked) {
+        if (checked) {
+            mIcon.setImageDrawable(mCheckedDrawable);
+            mTitle.setTextColor(mCheckedTextColor);
+        } else {
+            mIcon.setImageDrawable(mDefaultDrawable);
+            mTitle.setTextColor(mDefaultTextColor);
+        }
+        mChecked = checked;
+    }
+
+    @Override
+    public void setMessageNumber(int number) {
+        mMessages.setMessageNumber(number);
+    }
+
+    @Override
+    public void setHasMessage(boolean hasMessage) {
+        mMessages.setHasMessage(hasMessage);
+    }
+
+    @Override
+    public void setTitle(String title) {
+        mTitle.setText(title);
+    }
+
+    @Override
+    public void setDefaultDrawable(Drawable drawable) {
+        mDefaultDrawable = drawable;
+        if (!mChecked) {
+            mIcon.setImageDrawable(drawable);
+        }
+    }
+
+    @Override
+    public void setSelectedDrawable(Drawable drawable) {
+        mCheckedDrawable = drawable;
+        if (mChecked) {
+            mIcon.setImageDrawable(drawable);
+        }
+    }
+
+    @Override
+    public String getTitle() {
+        return mTitle.getText().toString();
+    }
+
+    public void setTextDefaultColor(@ColorInt int color) {
+        mDefaultTextColor = color;
+    }
+
+    public void setTextCheckedColor(@ColorInt int color) {
+        mCheckedTextColor = color;
+    }
+}

+ 121 - 0
library/src/main/java/com/library/weight/bottombar/SpecialTabRound.java

@@ -0,0 +1,121 @@
+package com.library.weight.bottombar;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.support.annotation.ColorInt;
+import android.support.annotation.DrawableRes;
+import android.support.v4.content.ContextCompat;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.library.R;
+
+import me.majiajie.pagerbottomtabstrip.internal.RoundMessageView;
+import me.majiajie.pagerbottomtabstrip.item.BaseTabItem;
+
+/**
+ * Created by mjj on 2017/6/3
+ */
+public class SpecialTabRound extends BaseTabItem {
+
+    private ImageView mIcon;
+    private final TextView mTitle;
+    private final RoundMessageView mMessages;
+
+    private Drawable mDefaultDrawable;
+    private Drawable mCheckedDrawable;
+
+    private int mDefaultTextColor = 0x56000000;
+    private int mCheckedTextColor = 0x56405cfe;
+
+    private boolean mChecked;
+
+    public SpecialTabRound(Context context) {
+        this(context, null);
+    }
+
+    public SpecialTabRound(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public SpecialTabRound(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+
+        LayoutInflater.from(context).inflate(R.layout.special_tab_round, this, true);
+
+        mIcon = findViewById(R.id.icon);
+        mTitle = findViewById(R.id.title);
+        mMessages = findViewById(R.id.messages);
+    }
+
+    /**
+     * 方便初始化的方法
+     *
+     * @param drawableRes        默认状态的图标
+     * @param checkedDrawableRes 选中状态的图标
+     * @param title              标题
+     */
+    public void initialize(@DrawableRes int drawableRes, @DrawableRes int checkedDrawableRes, String title) {
+        mDefaultDrawable = ContextCompat.getDrawable(getContext(), drawableRes);
+        mCheckedDrawable = ContextCompat.getDrawable(getContext(), checkedDrawableRes);
+        mTitle.setText(title);
+    }
+
+    @Override
+    public void setChecked(boolean checked) {
+        if (checked) {
+            mIcon.setImageDrawable(mCheckedDrawable);
+            mTitle.setTextColor(mCheckedTextColor);
+        } else {
+            mIcon.setImageDrawable(mDefaultDrawable);
+            mTitle.setTextColor(mDefaultTextColor);
+        }
+        mChecked = checked;
+    }
+
+    @Override
+    public void setMessageNumber(int number) {
+        mMessages.setMessageNumber(number);
+    }
+
+    @Override
+    public void setHasMessage(boolean hasMessage) {
+        mMessages.setHasMessage(hasMessage);
+    }
+
+    @Override
+    public void setTitle(String title) {
+        mTitle.setText(title);
+    }
+
+    @Override
+    public void setDefaultDrawable(Drawable drawable) {
+        mDefaultDrawable = drawable;
+        if (!mChecked) {
+            mIcon.setImageDrawable(drawable);
+        }
+    }
+
+    @Override
+    public void setSelectedDrawable(Drawable drawable) {
+        mCheckedDrawable = drawable;
+        if (mChecked) {
+            mIcon.setImageDrawable(drawable);
+        }
+    }
+
+    @Override
+    public String getTitle() {
+        return mTitle.getText().toString();
+    }
+
+    public void setTextDefaultColor(@ColorInt int color) {
+        mDefaultTextColor = color;
+    }
+
+    public void setTextCheckedColor(@ColorInt int color) {
+        mCheckedTextColor = color;
+    }
+}

+ 35 - 0
library/src/main/res/layout/special_tab.xml

@@ -0,0 +1,35 @@
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="80dp"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
+    <!-- android:background="@drawable/special_tab_bg"
+    android:foreground="?attr/selectableItemBackground"-->
+
+    <ImageView
+        android:id="@+id/icon"
+        android:layout_width="22dp"
+        android:layout_height="22dp"
+        android:layout_gravity="center_horizontal"
+        android:layout_marginTop="30dp"/>
+
+    <TextView
+        android:id="@+id/title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_horizontal"
+        android:layout_marginBottom="4dp"
+        android:layout_marginTop="3dp"
+        android:singleLine="true"
+        android:textSize="12sp"/>
+
+    <me.majiajie.pagerbottomtabstrip.internal.RoundMessageView
+        android:id="@+id/messages"
+        android:layout_width="20dp"
+        android:layout_height="20dp"
+        android:layout_gravity="center_horizontal"
+        android:layout_marginTop="3dp"
+        android:translationX="12dp"/>
+
+</LinearLayout>

+ 38 - 0
library/src/main/res/layout/special_tab_round.xml

@@ -0,0 +1,38 @@
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="80dp"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
+
+    <ImageView
+        android:id="@+id/icon"
+        android:layout_width="55dp"
+        android:layout_height="55dp"
+        android:layout_gravity="center_horizontal"
+        android:layout_marginTop="0dp"/>
+
+    <TextView
+        android:id="@+id/title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_horizontal"
+        android:layout_marginBottom="4dp"
+        android:layout_marginTop="0dp"
+        android:singleLine="true"
+        android:textSize="12sp"/>
+
+    <me.majiajie.pagerbottomtabstrip.internal.RoundMessageView
+        android:id="@+id/messages"
+        android:layout_width="20dp"
+        android:layout_height="433dp"
+        android:layout_gravity="center_horizontal"
+        android:layout_marginTop="3dp"
+        android:translationX="14dp"/>
+
+</LinearLayout>
+
+
+
+
+

+ 3 - 0
library/src/main/res/values/strings.xml

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">library</string>
+</resources>

+ 17 - 0
library/src/test/java/com/library/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.library;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() {
+        assertEquals(4, 2 + 2);
+    }
+}

+ 1 - 0
settings.gradle

@@ -0,0 +1 @@
+include ':app', ':library'