浏览代码

Merge branch 'sheep_develop' into 2.8

Conflicts:
	app/build.gradle
	app/src/main/AndroidManifest.xml
	app/src/main/java/com/kfzs/duanduan/ActSearch.java
	app/src/main/java/com/kfzs/duanduan/ActWeb.java
	app/src/main/java/com/kfzs/duanduan/db/DataSave.java
	app/src/main/java/com/kfzs/duanduan/utils/GameStatusScanner.java
	app/src/main/java/com/kfzs/duanduan/utils/dlg/CheckUtils.java
	app/src/main/java/com/kfzs/duanduan/utils/dlg/DownBtnUtils.java
	app/src/main/java/com/kfzs/duanduan/utils/net/APIRequest.java
	app/src/main/java/com/kfzs/duanduan/utils/net/APIRequestOptionV2.java
	app/src/main/java/com/kfzs/duanduan/utils/net/APIRequestV2.java
	app/src/main/java/com/kfzs/duanduan/utils/sys/ChannelContent.java
	app/src/main/java/com/sheep/gamegroup/event/EventDownloadHandler.java
	app/src/main/java/com/sheep/gamegroup/helper/DownloadHelper.java
	app/src/main/java/com/sheep/gamegroup/model/entity/DialogEntity.java
	app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
	app/src/main/java/com/sheep/gamegroup/util/DownloadUtil.java
	app/src/main/java/com/sheep/gamegroup/util/ShareJs.java
	app/src/main/java/com/sheep/gamegroup/util/WebviewJs.java
	app/src/main/java/com/sheep/gamegroup/view/activity/ActDownloadMgr.java
	app/src/main/java/com/sheep/gamegroup/view/activity/ActMainGame.java
	app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java
	app/src/main/java/com/sheep/gamegroup/view/adapter/DownloadMgrAdapter.java
	app/src/main/java/com/sheep/gamegroup/view/adapter/TryMakeMoneyAdp.java
	app/src/main/java/com/sheep/gamegroup/view/dialog/DialogAccountAbnormal.java
liujiangyao 7 年之前
父节点
当前提交
872b94209c
共有 100 个文件被更改,包括 892 次插入68839 次删除
  1. 2 1
      .gitignore
  2. 39 27
      app/build.gradle
  3. 二进制
      app/libs/com.kfzs.safe.aar
  4. 6 0
      app/proguard-rules.pro
  5. 72 28
      app/src/main/AndroidManifest.xml
  6. 0 75
      app/src/main/java/com/googlecode/protobuf/format/AbstractCharBasedFormatter.java
  7. 0 97
      app/src/main/java/com/googlecode/protobuf/format/CouchDBFormat.java
  8. 0 41
      app/src/main/java/com/googlecode/protobuf/format/FormatFactory.java
  9. 0 630
      app/src/main/java/com/googlecode/protobuf/format/HtmlFormat.java
  10. 0 1208
      app/src/main/java/com/googlecode/protobuf/format/JavaPropsFormat.java
  11. 0 1512
      app/src/main/java/com/googlecode/protobuf/format/JsonFormat.java
  12. 0 568
      app/src/main/java/com/googlecode/protobuf/format/JsonJacksonFormat.java
  13. 0 155
      app/src/main/java/com/googlecode/protobuf/format/ProtobufFormatter.java
  14. 0 72
      app/src/main/java/com/googlecode/protobuf/format/util/HexUtils.java
  15. 0 439
      app/src/main/java/com/googlecode/protobuf/format/util/TextUtils.java
  16. 0 508
      app/src/main/java/com/kfzs/duanduan/ActGameDetails.java
  17. 0 48
      app/src/main/java/com/kfzs/duanduan/ActGategoryRank.java
  18. 0 158
      app/src/main/java/com/kfzs/duanduan/ActMain.java
  19. 0 308
      app/src/main/java/com/kfzs/duanduan/BaseCompatActivity.java
  20. 0 263
      app/src/main/java/com/kfzs/duanduan/BaseCompatFragment.java
  21. 0 79
      app/src/main/java/com/kfzs/duanduan/CompatActivity.java
  22. 0 166
      app/src/main/java/com/kfzs/duanduan/KFZSApp.java
  23. 0 87
      app/src/main/java/com/kfzs/duanduan/adp/AdpCommonRecy.java
  24. 0 216
      app/src/main/java/com/kfzs/duanduan/adp/AdpFragmentRank.java
  25. 0 545
      app/src/main/java/com/kfzs/duanduan/adp/AdpMainPageRecy.java
  26. 0 140
      app/src/main/java/com/kfzs/duanduan/adp/AdpSearchGame.java
  27. 0 119
      app/src/main/java/com/kfzs/duanduan/adp/AdpSearchRecord.java
  28. 0 67
      app/src/main/java/com/kfzs/duanduan/adp/AdpSearchViewPager.java
  29. 0 50
      app/src/main/java/com/kfzs/duanduan/adp/AdpViewPagerDetail.java
  30. 0 69
      app/src/main/java/com/kfzs/duanduan/adp/BaseAdpterWithDownBtn.java
  31. 0 67
      app/src/main/java/com/kfzs/duanduan/adp/FilterWindowAdapter.java
  32. 0 108
      app/src/main/java/com/kfzs/duanduan/bean/BaseMsg.java
  33. 0 72
      app/src/main/java/com/kfzs/duanduan/bean/BorrowPlayIntegral.java
  34. 0 61
      app/src/main/java/com/kfzs/duanduan/bean/CateGameBean.java
  35. 0 34
      app/src/main/java/com/kfzs/duanduan/bean/CateGameList.java
  36. 0 23
      app/src/main/java/com/kfzs/duanduan/bean/CompareResult.java
  37. 0 85
      app/src/main/java/com/kfzs/duanduan/bean/ContactBean.java
  38. 0 312
      app/src/main/java/com/kfzs/duanduan/bean/Game.java
  39. 0 184
      app/src/main/java/com/kfzs/duanduan/bean/GiftItem.java
  40. 0 89
      app/src/main/java/com/kfzs/duanduan/bean/GiftList.java
  41. 0 45
      app/src/main/java/com/kfzs/duanduan/bean/GuessYouLike.java
  42. 0 40
      app/src/main/java/com/kfzs/duanduan/bean/KFIntentKeys.java
  43. 0 53
      app/src/main/java/com/kfzs/duanduan/bean/NewGameRecommend.java
  44. 0 48
      app/src/main/java/com/kfzs/duanduan/bean/QueryCondition.java
  45. 0 75
      app/src/main/java/com/kfzs/duanduan/bean/RecyleObj.java
  46. 0 52
      app/src/main/java/com/kfzs/duanduan/bean/RecyleType.java
  47. 0 33
      app/src/main/java/com/kfzs/duanduan/bean/SearchRecordBean.java
  48. 0 57
      app/src/main/java/com/kfzs/duanduan/bean/SelfInfoPojo.java
  49. 0 41
      app/src/main/java/com/kfzs/duanduan/bean/SpecialRecommend.java
  50. 0 29
      app/src/main/java/com/kfzs/duanduan/bean/UserRecord.java
  51. 0 279
      app/src/main/java/com/kfzs/duanduan/bean/VipStyle.java
  52. 0 19
      app/src/main/java/com/kfzs/duanduan/bean/YinkerData.java
  53. 0 98
      app/src/main/java/com/kfzs/duanduan/bll/GameListBll.java
  54. 0 214
      app/src/main/java/com/kfzs/duanduan/bll/UrlBll.java
  55. 58 0
      app/src/main/java/com/kfzs/duanduan/cardview/BitmapUtils.java
  56. 74 0
      app/src/main/java/com/kfzs/duanduan/cardview/BlurBitmapUtils.java
  57. 61 0
      app/src/main/java/com/kfzs/duanduan/cardview/CardAdapter.java
  58. 46 0
      app/src/main/java/com/kfzs/duanduan/cardview/CardAdapterHelper.java
  59. 24 0
      app/src/main/java/com/kfzs/duanduan/cardview/CardLinearSnapHelper.java
  60. 150 0
      app/src/main/java/com/kfzs/duanduan/cardview/CardScaleHelper.java
  61. 147 0
      app/src/main/java/com/kfzs/duanduan/cardview/LogUtils.java
  62. 38 0
      app/src/main/java/com/kfzs/duanduan/cardview/ScreenUtil.java
  63. 44 0
      app/src/main/java/com/kfzs/duanduan/cardview/SpeedRecyclerView.java
  64. 42 0
      app/src/main/java/com/kfzs/duanduan/cardview/ViewSwitchUtils.java
  65. 87 0
      app/src/main/java/com/kfzs/duanduan/cardview/ViewUtil.java
  66. 0 93
      app/src/main/java/com/kfzs/duanduan/db/SearchRecordHelper.java
  67. 0 17
      app/src/main/java/com/kfzs/duanduan/event/ReStartEvent.java
  68. 0 75
      app/src/main/java/com/kfzs/duanduan/event/UserEvent.java
  69. 0 206
      app/src/main/java/com/kfzs/duanduan/fragment/CategoryRankFragment.java
  70. 2 2
      app/src/main/java/com/kfzs/duanduan/fragment/FgtBorrowPlay.java
  71. 0 164
      app/src/main/java/com/kfzs/duanduan/fragment/FgtFind.java
  72. 0 218
      app/src/main/java/com/kfzs/duanduan/fragment/FgtGameDetail.java
  73. 0 371
      app/src/main/java/com/kfzs/duanduan/fragment/FgtMainGame.java
  74. 0 82
      app/src/main/java/com/kfzs/duanduan/mine/ShenheAdapter.java
  75. 0 951
      app/src/main/java/com/kfzs/duanduan/proto/AdviceOuterClass.java
  76. 0 1314
      app/src/main/java/com/kfzs/duanduan/proto/ApiPublic.java
  77. 0 8991
      app/src/main/java/com/kfzs/duanduan/proto/ApiRequestOuterClass.java
  78. 0 17374
      app/src/main/java/com/kfzs/duanduan/proto/ApiResponseOuterClass.java
  79. 0 559
      app/src/main/java/com/kfzs/duanduan/proto/Captcha.java
  80. 0 761
      app/src/main/java/com/kfzs/duanduan/proto/CouponCodeOuterClass.java
  81. 0 1480
      app/src/main/java/com/kfzs/duanduan/proto/CouponOuterClass.java
  82. 0 1162
      app/src/main/java/com/kfzs/duanduan/proto/ExclusiveStartingOuterClass.java
  83. 0 1535
      app/src/main/java/com/kfzs/duanduan/proto/GameActivityConfOuterClass.java
  84. 0 3927
      app/src/main/java/com/kfzs/duanduan/proto/GameBookOuterClass.java
  85. 0 620
      app/src/main/java/com/kfzs/duanduan/proto/GameGiftRelationOuterClass.java
  86. 0 4264
      app/src/main/java/com/kfzs/duanduan/proto/GameOuterClass.java
  87. 0 1530
      app/src/main/java/com/kfzs/duanduan/proto/GameTypeClassOuterClass.java
  88. 0 1140
      app/src/main/java/com/kfzs/duanduan/proto/GameTypeOuterClass.java
  89. 0 683
      app/src/main/java/com/kfzs/duanduan/proto/GameTypeRelationOuterClass.java
  90. 0 768
      app/src/main/java/com/kfzs/duanduan/proto/GameTypeSpecialOuterClass.java
  91. 0 1162
      app/src/main/java/com/kfzs/duanduan/proto/GamesList.java
  92. 0 1086
      app/src/main/java/com/kfzs/duanduan/proto/GiftCenterOuterClass.java
  93. 0 893
      app/src/main/java/com/kfzs/duanduan/proto/GiftCodeOuterClass.java
  94. 0 1295
      app/src/main/java/com/kfzs/duanduan/proto/GiftOuterClass.java
  95. 0 759
      app/src/main/java/com/kfzs/duanduan/proto/GiftTypeOuterClass.java
  96. 0 757
      app/src/main/java/com/kfzs/duanduan/proto/HotWordsOuterClass.java
  97. 0 1898
      app/src/main/java/com/kfzs/duanduan/proto/IndexAllbannerOuterClass.java
  98. 0 1486
      app/src/main/java/com/kfzs/duanduan/proto/IndexBannerGiftCenterOuterClass.java
  99. 0 1422
      app/src/main/java/com/kfzs/duanduan/proto/IndexBannerOuterClass.java
  100. 0 0
      app/src/main/java/com/kfzs/duanduan/proto/IndexGameOuterClass.java

+ 2 - 1
.gitignore

@@ -9,4 +9,5 @@
 .externalNativeBuild
 /.idea
 /kfzslibrary
-/banner
+/banner
+/app/src/main/obj

+ 39 - 27
app/build.gradle

@@ -1,5 +1,6 @@
 apply plugin: 'com.android.application'
 apply plugin: 'com.jakewharton.butterknife'
+//apply plugin: 'realm-android'//Realm数据库
 android {
     compileSdkVersion androidConfigs.compileSdkVersion
     buildToolsVersion androidConfigs.buildToolsVersion
@@ -59,17 +60,17 @@ android {
         }
     }
     productFlavors.all { flavor ->
-        flavor.manifestPlaceholders = [DUANDUAN_GRAPH     : "${flavor.name}",
-                                       DUANDUAN_DATASHARE : "${flavor.name}",
+        flavor.manifestPlaceholders = [DUANDUAN_GRAPH    : "${flavor.name}",
+                                       DUANDUAN_DATASHARE: "${flavor.name}",
         ]
     }
     productFlavors {
         developSheeptest {
             applicationId "com.sheep.jiuyan.samllsheep"
-            manifestPlaceholders = [DUANDUAN_GRAPH     : "sheeptest",
-                                    DUANDUAN_DATASHARE : "sheeptest",
-                                    jpush_appkey       : "4fea09bdbf9661a9689ee306",
-                                    umeng_app_key       : "5ab0a1da8f4a9d742900035f"
+            manifestPlaceholders = [DUANDUAN_GRAPH    : "sheeptest",
+                                    DUANDUAN_DATASHARE: "sheeptest",
+                                    jpush_appkey      : "4fea09bdbf9661a9689ee306",
+                                    umeng_app_key     : "5ab0a1da8f4a9d742900035f"
             ]
             buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptest"'
             buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptest"'
@@ -78,26 +79,26 @@ android {
             buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"'
             signingConfig signingConfigs.config
         }
-        sheeptestjiguang {
-            applicationId "com.sheep.jiuyan.samllsheep.test"
-            manifestPlaceholders = [DUANDUAN_GRAPH     : "sheeptestjiguang",
-                                    DUANDUAN_DATASHARE : "sheeptestjiguang",
-                                    jpush_appkey       : "4fea09bdbf9661a9689ee306",
-                                    umeng_app_key       : "5ab0a1da8f4a9d742900035f"
-            ]
-            buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptestjiguang"'
-            buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptestjiguang"'
-            buildConfigField "String", "app_name", '"小绵羊测试"'
-            buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
-            buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"'
-            signingConfig signingConfigs.config
-        }
+//        sheeptestjiguang {
+//            applicationId "com.sheep.jiuyan.samllsheep.test"
+//            manifestPlaceholders = [DUANDUAN_GRAPH    : "sheeptestjiguang",
+//                                    DUANDUAN_DATASHARE: "sheeptestjiguang",
+//                                    jpush_appkey      : "4fea09bdbf9661a9689ee306",
+//                                    umeng_app_key     : "5ab0a1da8f4a9d742900035f"
+//            ]
+//            buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptestjiguang"'
+//            buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptestjiguang"'
+//            buildConfigField "String", "app_name", '"小绵羊测试"'
+//            buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
+//            buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"'
+//            signingConfig signingConfigs.config
+//        }
         sheep {
             applicationId "com.sheep.jiuyan.samllsheep"
-            manifestPlaceholders = [DUANDUAN_GRAPH     : "sheep",
-                                    DUANDUAN_DATASHARE : "sheep",
-                                    jpush_appkey       : "28b74d520261c6f78e3e0921",
-                                    umeng_app_key       : "5ab0a1da8f4a9d742900035f"
+            manifestPlaceholders = [DUANDUAN_GRAPH    : "sheep",
+                                    DUANDUAN_DATASHARE: "sheep",
+                                    jpush_appkey      : "28b74d520261c6f78e3e0921",
+                                    umeng_app_key     : "5ab0a1da8f4a9d742900035f"
             ]
             buildConfigField "String", "DUANDUAN_DATASHARE", '"sheep"'
             buildConfigField "String", "DUANDUAN_GRAPH", '"sheep"'
@@ -108,6 +109,13 @@ android {
 
         }
     }
+    sourceSets {
+        main() {
+            jniLibs.srcDirs = ['src/main/libs']
+            jni.srcDirs = [] //屏蔽掉默认的jni编译生成过程
+        }
+    }
+
 }
 
 repositories {
@@ -118,11 +126,13 @@ repositories {
 }
 
 dependencies {
+    //noinspection GradleCompatible
+    compile 'com.android.support:cardview-v7:28.0.0-rc01'
     compile "com.android.support:design:$supportLibVersion"
     compile 'com.android.support.constraint:constraint-layout:1.0.2'
     testCompile 'junit:junit:4.12'
     compile 'com.google.code.gson:gson:2.8.2'
-    compile('com.jcodecraeer:xrecyclerview:1.5.2') {
+    compile('com.jcodecraeer:xrecyclerview:1.5.9') {
         //    compile 'com.shark:screencapture:1.0.0'
         exclude group: 'com.android.support', module: 'design'
     }
@@ -223,6 +233,7 @@ dependencies {
     compile 'com.kf.framework:volleyplus:1.4.5@aar'
     compile "com.android.support:support-annotations:$supportLibVersion"
     compile "com.android.support:recyclerview-v7:$supportLibVersion"
+    compile project(':datashare')
     compile files('libs/jackson-core-2.2.1.jar')
     compile files('libs/jackson-dataformat-xml-2.1.2.jar')
     compile 'io.reactivex:rxandroid:1.2.1'
@@ -260,8 +271,9 @@ dependencies {
 //    compile 'com.github.nanchen2251:CompressHelper:1.0.5'
 //    compile(name: 'compresshelper-release', ext: 'aar')
     compile files('libs/compresshelper-release.jar')
-    compile 'org.greenrobot:greendao:3.2.2'
+    compile 'com.haibin:calendarview:3.4.4'
 }
+
 static def releaseTime() {
     return new Date().format("MMddHHmm", TimeZone.getDefault())
 }
@@ -270,7 +282,7 @@ android.applicationVariants.all {
     variant ->
         variant.outputs.each {
             output ->
-                if(buildType.name == "release") {
+                if (buildType.name == "release") {
                     output.outputFile = new File(output.outputFile.parent, productFlavors[0].name + "_" + buildType.name + "_v" + android.defaultConfig.versionName + "_" + android.defaultConfig.versionCode + "-${releaseTime()}.apk")
                 }
 

二进制
app/libs/com.kfzs.safe.aar


+ 6 - 0
app/proguard-rules.pro

@@ -151,6 +151,7 @@
 -keep class com.kfzs.duanduan.bean.** { *; }
 -keep class com.kfzs.duanduan.proto.** { *; }
 -keep class com.sheep.gamegroup.model.** { *; }
+-keep class com.jcodecraeer.** { *; }
 -keep class com.sheep.jiuyan.samllsheep.service.DownloadService { *; }
 
 #datashare
@@ -452,4 +453,9 @@
 # banner 的混淆代码
 -keep class com.youth.banner.** {
     *;
+ }
+
+#==================compile 'com.haibin:calendarview:3.4.4'==========================
+ -keepclasseswithmembers class * {
+     public <init>(android.content.Context);
  }

+ 72 - 28
app/src/main/AndroidManifest.xml

@@ -97,8 +97,10 @@
         android:label="@string/app_name"
         android:persistent="true"
         android:supportsRtl="true"
+        android:largeHeap="true"
         android:theme="@style/AppTheme">
-
+        <meta-data android:name="design_width_in_dp" android:value="375"/>
+        <meta-data android:name="design_height_in_dp" android:value="667"/>
         <activity
             android:name=".wxapi.WXEntryActivity"
             android:exported="true"
@@ -156,6 +158,7 @@
         <!--2.0-->
         <activity
             android:name="com.sheep.gamegroup.view.activity.LoginAct"
+            android:configChanges="keyboardHidden|screenSize|orientation"
             android:launchMode="singleTask"
             android:screenOrientation="portrait"
             android:theme="@style/FullScreenTheme">
@@ -173,8 +176,6 @@
             </intent-filter>
         </activity>
 
-        <activity android:name="com.sheep.gamegroup.view.activity.PhoneAct"
-            android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.PersonalCenterAct"
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.WithdrawalAct"
@@ -200,15 +201,32 @@
         <activity android:name="com.sheep.gamegroup.view.activity.ChangeTelAct"
             android:screenOrientation="portrait"
             android:launchMode="singleTask"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActBindMobileRegister"
+            android:screenOrientation="portrait"
+            android:launchMode="singleTask"/>
         <activity android:name="com.sheep.gamegroup.view.activity.TaskDetailAct"
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.DialogToastAct"
             android:theme="@style/MyDialogActivityTheme"
             />
 
-        <!--半袋米首页-->
-        <activity
-            android:name="com.kfzs.duanduan.ActMain"
+        <!--&lt;!&ndash;半袋米首页&ndash;&gt;-->
+        <!--<activity-->
+            <!--android:name="com.kfzs.duanduan.ActMain"-->
+            <!--android:configChanges="keyboardHidden|screenSize|orientation"-->
+            <!--android:exported="true"-->
+            <!--android:hardwareAccelerated="true"-->
+            <!--android:launchMode="singleTask"-->
+            <!--android:screenOrientation="portrait"-->
+            <!--android:theme="@style/AppTheme"-->
+            <!--android:windowSoftInputMode="adjustPan|stateHidden">-->
+            <!--<intent-filter>-->
+                <!--<category android:name="android.intent.category.DEFAULT" />-->
+                <!--<action android:name="android.intent.action.VIEW" />-->
+            <!--</intent-filter>-->
+        <!--</activity>-->
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActMain"
             android:configChanges="keyboardHidden|screenSize|orientation"
             android:exported="true"
             android:hardwareAccelerated="true"
@@ -223,32 +241,25 @@
         </activity>
 
         <activity
-            android:name="com.kfzs.duanduan.ActSearch"
-            android:screenOrientation="portrait"
-            android:windowSoftInputMode="adjustNothing" />
-        <activity
-            android:name="com.kfzs.duanduan.ActGameDetails"
-            android:screenOrientation="portrait" />
-        <activity
-            android:name="com.kfzs.duanduan.ActGategoryRank"
-            android:screenOrientation="portrait" />
-
-        <activity
             android:name="com.sheep.gamegroup.view.activity.AskGetMoneyAct"
             android:screenOrientation="portrait" />
 
         <activity
-            android:name="com.kfzs.duanduan.ActWeb"
-            android:hardwareAccelerated="true"
-            android:screenOrientation="portrait" />
-
-
-        <activity
-            android:name="com.kfzs.duanduan.ActDownloadMgr"
+            android:name="com.sheep.gamegroup.view.activity.ActDownloadMgr"
             android:hardwareAccelerated="false"
             android:screenOrientation="portrait" />
 
+<<<<<<< HEAD
         <receiver android:name="com.kfzs.duanduan.oem.AppAddOrdelReceiver">
+=======
+        <provider
+            android:name="com.kfzs.duanduan.data.graph.provider.KFZSProvider"
+            android:authorities="com.kfzs.duanduan.data.graph.provider.${DUANDUAN_GRAPH}"
+            android:exported="true" />
+
+
+        <receiver android:name="com.sheep.gamegroup.receiver.AppAddOrDelReceiver">
+>>>>>>> sheep_develop
             <intent-filter>
                 <action android:name="android.intent.action.PACKAGE_ADDED" />
                 <action android:name="android.intent.action.PACKAGE_REMOVED" />
@@ -342,7 +353,6 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActWeb"
-            android:hardwareAccelerated="false"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActMyMoney"
@@ -350,12 +360,15 @@
         <activity
             android:name="com.sheep.gamegroup.view.activity.FeedbackAct"
             android:screenOrientation="portrait" />
-        <activity
-            android:name="com.sheep.gamegroup.view.activity.ActMainGame"
-            android:screenOrientation="portrait" />
 
 
         <activity
+            android:name="com.sheep.gamegroup.view.activity.ActSignCard"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActSignCardRecord"
+            android:screenOrientation="portrait" />
+        <activity
             android:name="com.sheep.gamegroup.view.activity.SignCardAct"
             android:screenOrientation="portrait" />
         <activity
@@ -554,6 +567,8 @@
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.ActSheepApkList"
             android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActSheepPngList"
+            android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.ActFindGame"
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.ActFindInformation"
@@ -569,11 +584,40 @@
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.ActSetting"
             android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.MessagesActivity"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActMsg"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActGameCenter"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActDownloadWelfareList"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActGiftCenter"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActMyWelfare"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.MessageInteractionDetailActivity"
+            android:exported="true"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActModifyThird"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActEverydayPlayGame"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActPlayGameDetail"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.MessageCenterDetailActivity"
+            android:exported="true"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.InvitationActivity"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActInvitation"
+            android:screenOrientation="portrait"/>
 
         <!--start幂动科技-->
 
         <activity android:name="com.sheep.gamegroup.view.activity.ActMiDong"
             android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.GameCertificationActivity"
+            android:exported="true"
+            android:screenOrientation="portrait"/>
 
         <service
             android:name="com.mdad.sdk.mdsdk.monitor.MonitorService"

+ 0 - 75
app/src/main/java/com/googlecode/protobuf/format/AbstractCharBasedFormatter.java

@@ -1,75 +0,0 @@
-/*
-  Copyright 2000-2011 NeuStar, Inc. All rights reserved.
-  NeuStar, the Neustar logo and related names and logos are registered
-  trademarks, service marks or tradenames of NeuStar, Inc. All other
-  product names, company names, marks, logos and symbols may be trademarks
-  of their respective owners.
- */
-
-package com.googlecode.protobuf.format;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.nio.charset.Charset;
-
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.Message;
-import com.google.protobuf.Message.Builder;
-import com.google.protobuf.UnknownFieldSet;
-import com.googlecode.protobuf.format.util.TextUtils;
-
-public abstract class AbstractCharBasedFormatter extends ProtobufFormatter {
-
-	@Override
-	public void print(Message message, OutputStream output, Charset cs)
-			throws IOException {
-		OutputStreamWriter writer = new OutputStreamWriter(output, cs);
-		print(message, writer);
-		writer.flush();
-	}
-	
-	abstract public void print(Message message, Appendable output) throws IOException;
-
-
-	@Override
-	public void print(UnknownFieldSet fields, OutputStream output, Charset cs)
-			throws IOException {
-		OutputStreamWriter writer = new OutputStreamWriter(output, cs);
-		print(fields, writer);
-		writer.flush();
-	}
-	
-	abstract public void print(UnknownFieldSet fields, Appendable output) throws IOException;
-
-	@Override
-	public void merge(InputStream input, Charset cs, 
-			ExtensionRegistry extensionRegistry, Builder builder) throws IOException {
-		InputStreamReader reader = new InputStreamReader(input, cs);
-		merge(reader, extensionRegistry, builder);
-	}
-	
-	
-	abstract public void merge(CharSequence input, ExtensionRegistry extensionRegistry,
-            Builder builder) throws IOException;
-	
-	/**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     */
-    public void merge(Readable input,
-    		ExtensionRegistry extensionRegistry,
-    		Builder builder) throws IOException {
-        // Read the entire input to a String then parse that.
-
-        // If StreamTokenizer were not quite so crippled, or if there were a kind
-        // of Reader that could read in chunks that match some particular regex,
-        // or if we wanted to write a custom Reader to tokenize our stream, then
-        // we would not have to read to one big String. Alas, none of these is
-        // the case. Oh well.
-
-		merge(TextUtils.toStringBuilder(input), extensionRegistry, builder);
-    }
-}

+ 0 - 97
app/src/main/java/com/googlecode/protobuf/format/CouchDBFormat.java

@@ -1,97 +0,0 @@
-package com.googlecode.protobuf.format;
-
-
-import java.io.IOException;
-
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.Message;
-import com.google.protobuf.UnknownFieldSet;
-
-/**
- * Created by IntelliJ IDEA.
- * User: aantonov
- * Date: Mar 16, 2010
- * Time: 4:06:05 PM
- * To change this template use File | Settings | File Templates.
- */
-public class CouchDBFormat extends JsonFormat {
-
-    /**
-     * Outputs a textual representation of the Protocol Message supplied into the parameter output.
-     * (This representation is the new version of the classic "ProtocolPrinter" output from the
-     * original Protocol Buffer system)
-     */
-    public void print(final Message message, Appendable output) throws IOException {
-        CouchDBGenerator generator = new CouchDBGenerator(output);
-        generator.print("{");
-        print(message, generator);
-        generator.print("}");
-    }
-
-    /**
-     * Outputs a textual representation of {@code fields} to {@code output}.
-     */
-    public void print(final UnknownFieldSet fields, Appendable output) throws IOException {
-        CouchDBGenerator generator = new CouchDBGenerator(output);
-        generator.print("{");
-        printUnknownFields(fields, generator);
-        generator.print("}");
-    }
-
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     */
-    public void merge(CharSequence input,
-                             ExtensionRegistry extensionRegistry,
-                             Message.Builder builder) throws ParseException {
-        Tokenizer tokenizer = new Tokenizer(input);
-
-        // Based on the state machine @ http://json.org/
-
-        tokenizer.consume("{"); // Needs to happen when the object starts.
-        while (!tokenizer.tryConsume("}")) { // Continue till the object is done
-            mergeField(tokenizer, extensionRegistry, builder);
-        }
-    }
-
-    protected static class Tokenizer extends JsonFormat.Tokenizer {
-
-        /**
-         * Construct a tokenizer that parses tokens from the given text.
-         */
-        public Tokenizer(CharSequence text) {
-            super(text);
-        }
-
-        @Override
-        public String consumeIdentifier() throws ParseException {
-            String id = super.consumeIdentifier();
-            if ("_id".equals(id)) {
-                return "id";
-            } else if ("_rev".equals(id)) {
-                return "rev";
-            }
-            return id;
-        }
-    }
-
-    protected static class CouchDBGenerator extends JsonGenerator {
-
-        public CouchDBGenerator(Appendable output) {
-            super(output);
-        }
-
-        @Override
-        public void print(CharSequence text) throws IOException {
-            if ("id".equals(text)) {
-                super.print("_id");
-            } else if ("rev".equals(text)) {
-                super.print("_rev");
-            } else {
-                super.print(text);
-            }
-        }
-    }
-}

+ 0 - 41
app/src/main/java/com/googlecode/protobuf/format/FormatFactory.java

@@ -1,41 +0,0 @@
-/*
-  Copyright 2000-2011 NeuStar, Inc. All rights reserved.
-  NeuStar, the Neustar logo and related names and logos are registered
-  trademarks, service marks or tradenames of NeuStar, Inc. All other
-  product names, company names, marks, logos and symbols may be trademarks
-  of their respective owners.
- */
-
-package com.googlecode.protobuf.format;
-
-public class FormatFactory {
-	
-	public FormatFactory() {}
-	
-	public enum Formatter {
-		COUCHDB (CouchDBFormat.class),
-		HTML (HtmlFormat.class),
-		JAVA_PROPS (JavaPropsFormat.class),
-		JSON (JsonFormat.class),
-		JSON_JACKSON (JsonJacksonFormat.class);
-
-		private Class<? extends ProtobufFormatter> formatterClass;
-		Formatter(Class<? extends ProtobufFormatter> formatterClass) {
-			this.formatterClass = formatterClass;
-		}
-		protected Class<? extends ProtobufFormatter> getFormatterClass() {
-			return formatterClass;
-		}
-	}
-	
-	
-	public ProtobufFormatter createFormatter(Formatter formatter) {
-		try {
-			return formatter.getFormatterClass().newInstance();
-		} catch (InstantiationException e) {
-			throw new RuntimeException(e);
-		} catch (IllegalAccessException e) {
-			throw new RuntimeException(e);
-		}
-	}
-}

+ 0 - 630
app/src/main/java/com/googlecode/protobuf/format/HtmlFormat.java

@@ -1,630 +0,0 @@
-package com.googlecode.protobuf.format;
-/* 
-    Copyright (c) 2009, Orbitz World Wide
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without modification, 
-    are permitted provided that the following conditions are met:
-
-        * Redistributions of source code must retain the above copyright notice, 
-          this list of conditions and the following disclaimer.
-        * Redistributions in binary form must reproduce the above copyright notice, 
-          this list of conditions and the following disclaimer in the documentation 
-          and/or other materials provided with the distribution.
-        * Neither the name of the Orbitz World Wide nor the names of its contributors 
-          may be used to endorse or promote products derived from this software 
-          without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-import java.io.IOException;
-import java.math.BigInteger;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import com.google.protobuf.ByteString;
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.Message;
-import com.google.protobuf.Message.Builder;
-import com.google.protobuf.UnknownFieldSet;
-import com.google.protobuf.Descriptors.EnumValueDescriptor;
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import static com.googlecode.protobuf.format.util.TextUtils.*;
-
-
-/**
- * Provide ascii html formatting support for proto2 instances.
- * <p>
- * (c) 2009-10 Orbitz World Wide. All Rights Reserved.
- * 
- * @author eliran.bivas@gmail.com Eliran Bivas
- * @version $HtmlFormat.java Mar 12, 2009 4:00:33 PM$
- */
-public final class HtmlFormat extends AbstractCharBasedFormatter {
-
-    private static final String META_CONTENT = "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />";
-    private static final String MAIN_DIV_STYLE = "color: black; font-size: 14px; font-family: sans-serif; font-weight: bolder; margin-bottom: 10px;";
-    private static final String FIELD_NAME_STYLE = "font-weight: bold; color: #669966;font-size: 14px; font-family: sans-serif;";
-    private static final String FIELD_VALUE_STYLE = "color: #3300FF;font-size: 13px; font-family: sans-serif;";
-
-    
-    public void print(final Message message, Appendable output) throws IOException {
-    	HtmlGenerator generator = new HtmlGenerator(output);
-        printTitle(message, generator);
-        print(message, generator);
-        generator.print("</body></html>");
-    }
-    
-	public void print(final UnknownFieldSet fields, Appendable output) throws IOException {
-		HtmlGenerator generator = new HtmlGenerator(output);
-        generator.print("<html>");
-        generator.print(META_CONTENT);
-        generator.print("</head><body>");
-        printUnknownFields(fields, generator);
-        generator.print("</body></html>");
-	}
-	
-	@Override
-	public void merge(CharSequence input, ExtensionRegistry extensionRegistry,
-			Builder builder) throws IOException {
-		throw new UnsupportedOperationException();
-	}
-    
-
-    private void printTitle(final Message message, final HtmlGenerator generator) throws IOException {
-        generator.print("<html><head>");
-        generator.print(META_CONTENT);
-        generator.print("<title>");
-        generator.print(message.getDescriptorForType().getFullName());
-        generator.print("</title></head><body>");
-        generator.print("<div style=\"");
-        generator.print(MAIN_DIV_STYLE);
-        generator.print("\">message : ");
-        generator.print(message.getDescriptorForType().getFullName());
-        generator.print("</div>");
-    }
-
-
-    private void print(Message message, HtmlGenerator generator) throws IOException {
-
-        for (Map.Entry<FieldDescriptor, Object> field : message.getAllFields().entrySet()) {
-            printField(field.getKey(), field.getValue(), generator);
-        }
-        printUnknownFields(message.getUnknownFields(), generator);
-    }
-
-    public void printField(FieldDescriptor field, Object value, HtmlGenerator generator) throws IOException {
-
-        if (field.isRepeated()) {
-            // Repeated field. Print each element.
-            for (Object element : (List<?>) value) {
-                printSingleField(field, element, generator);
-            }
-        } else {
-            printSingleField(field, value, generator);
-        }
-    }
-
-    private void printSingleField(FieldDescriptor field,
-                                         Object value,
-                                         HtmlGenerator generator) throws IOException {
-        if (field.isExtension()) {
-            generator.print("[<span style=\"");
-            generator.print(FIELD_NAME_STYLE);
-            generator.print("\">");
-            // We special-case MessageSet elements for compatibility with proto1.
-            if (field.getContainingType().getOptions().getMessageSetWireFormat()
-                            && (field.getType() == FieldDescriptor.Type.MESSAGE) && (field.isOptional())
-                            // object equality
-                            && (field.getExtensionScope() == field.getMessageType())) {
-                generator.print(field.getMessageType().getFullName());
-            } else {
-                generator.print(field.getFullName());
-            }
-            generator.print("</span>]");
-        } else {
-            generator.print("<span style=\"");
-            generator.print(FIELD_NAME_STYLE);
-            generator.print("\">");
-            if (field.getType() == FieldDescriptor.Type.GROUP) {
-                // Groups must be serialized with their original capitalization.
-                generator.print(field.getMessageType().getName());
-            } else {
-                generator.print(field.getName());
-            }
-            generator.print("</span>");
-        }
-
-        if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
-            generator.print(" <span style=\"color: red;\">{</span><br/>");
-            generator.indent();
-        } else {
-            generator.print(": ");
-        }
-
-        printFieldValue(field, value, generator);
-
-        if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
-            generator.outdent();
-            generator.print("<span style=\"color: red;\">}</span>");
-        }
-        generator.print("<br/>");
-    }
-
-    private void printFieldValue(FieldDescriptor field, Object value, HtmlGenerator generator) throws IOException {
-        generator.print("<span style=\"");
-        generator.print(FIELD_VALUE_STYLE);
-        generator.print("\">");
-        switch (field.getType()) {
-            case INT32:
-            case INT64:
-            case SINT32:
-            case SINT64:
-            case SFIXED32:
-            case SFIXED64:
-            case FLOAT:
-            case DOUBLE:
-            case BOOL:
-                // Good old toString() does what we want for these types.
-                generator.print(value.toString());
-                break;
-
-            case UINT32:
-            case FIXED32:
-                generator.print(unsignedToString((Integer) value));
-                break;
-
-            case UINT64:
-            case FIXED64:
-                generator.print(unsignedToString((Long) value));
-                break;
-
-            case STRING:
-                generator.print("\"");
-                generator.print(value.toString());
-                generator.print("\"");
-                break;
-
-            case BYTES: {
-                generator.print("\"");
-                generator.print(escapeBytes((ByteString) value));
-                generator.print("\"");
-                break;
-            }
-
-            case ENUM: {
-                generator.print(((EnumValueDescriptor) value).getName());
-                break;
-            }
-
-            case MESSAGE:
-            case GROUP:
-                print((Message) value, generator);
-                break;
-        }
-        generator.print("</span>");
-    }
-
-    private void printUnknownFields(UnknownFieldSet unknownFields, HtmlGenerator generator) throws IOException {
-        for (Map.Entry<Integer, UnknownFieldSet.Field> entry : unknownFields.asMap().entrySet()) {
-            UnknownFieldSet.Field field = entry.getValue();
-
-            for (long value : field.getVarintList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(unsignedToString(value));
-                generator.print("<br/>");
-            }
-            for (int value : field.getFixed32List()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(String.format((Locale) null, "0x%08x", value));
-                generator.print("<br/>");
-            }
-            for (long value : field.getFixed64List()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(String.format((Locale) null, "0x%016x", value));
-                generator.print("<br/>");
-            }
-            for (ByteString value : field.getLengthDelimitedList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": \"");
-                generator.print(escapeBytes(value));
-                generator.print("\"<br/>");
-            }
-            for (UnknownFieldSet value : field.getGroupList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(" <span style=\"color: red;\">{</span><br/>");
-                generator.indent();
-                printUnknownFields(value, generator);
-                generator.outdent();
-                generator.print("<span style=\"color: red;\">}</span><br/>");
-            }
-        }
-    }
-
-    
-
-    /**
-     * An inner class for writing text to the output stream.
-     */
-    static private final class HtmlGenerator {
-
-        Appendable output;
-        boolean atStartOfLine = true;
-
-        public HtmlGenerator(Appendable output) {
-            this.output = output;
-        }
-
-        /**
-         * Indent text by two spaces. After calling Indent(), two spaces will be inserted at the
-         * beginning of each line of text. Indent() may be called multiple times to produce deeper
-         * indents.
-         * 
-         * @throws IOException
-         */
-        public void indent() throws IOException {
-            print("<div style=\"margin-left: 25px\">");
-        }
-
-        /**
-         * Reduces the current indent level by two spaces, or crashes if the indent level is zero.
-         * 
-         * @throws IOException
-         */
-        public void outdent() throws IOException {
-            print("</div>");
-        }
-
-        /**
-         * Print text to the output stream.
-         */
-        public void print(CharSequence text) throws IOException {
-            int size = text.length();
-            int pos = 0;
-
-            for (int i = 0; i < size; i++) {
-                if (text.charAt(i) == '\n') {
-                    write("<br/>", i - pos + 1);
-                    pos = i + 1;
-                    atStartOfLine = true;
-                }
-            }
-            write(text.subSequence(pos, size), size - pos);
-        }
-
-        private void write(CharSequence data, int size) throws IOException {
-            if (size == 0) {
-                return;
-            }
-            if (atStartOfLine) {
-                atStartOfLine = false;
-            }
-            output.append(data);
-        }
-    }
-
-    // =================================================================
-    // Utility functions
-    //
-    // Some of these methods are package-private because Descriptors.java uses
-    // them.
-
-    /**
-     * Escapes bytes in the format used in protocol buffer text format, which is the same as the
-     * format used for C string literals. All bytes that are not printable 7-bit ASCII characters
-     * are escaped, as well as backslash, single-quote, and double-quote characters. Characters for
-     * which no defined short-hand escape sequence is defined will be escaped using 3-digit octal
-     * sequences.
-     */
-    static String escapeBytes(ByteString input) {
-        StringBuilder builder = new StringBuilder(input.size());
-        for (int i = 0; i < input.size(); i++) {
-            byte b = input.byteAt(i);
-            switch (b) {
-                // Java does not recognize \a or \v, apparently.
-                case 0x07:
-                    builder.append("\\a");
-                    break;
-                case '\b':
-                    builder.append("\\b");
-                    break;
-                case '\f':
-                    builder.append("\\f");
-                    break;
-                case '\n':
-                    builder.append("\\n");
-                    break;
-                case '\r':
-                    builder.append("\\r");
-                    break;
-                case '\t':
-                    builder.append("\\t");
-                    break;
-                case 0x0b:
-                    builder.append("\\v");
-                    break;
-                case '\\':
-                    builder.append("\\\\");
-                    break;
-                case '\'':
-                    builder.append("\\\'");
-                    break;
-                case '"':
-                    builder.append("\\\"");
-                    break;
-                default:
-                    if (b >= 0x20) {
-                        builder.append((char) b);
-                    } else {
-                        builder.append('\\');
-                        builder.append((char) ('0' + ((b >>> 6) & 3)));
-                        builder.append((char) ('0' + ((b >>> 3) & 7)));
-                        builder.append((char) ('0' + (b & 7)));
-                    }
-                    break;
-            }
-        }
-        return builder.toString();
-    }
-
-    /**
-     * Un-escape a byte sequence as escaped using
-     * {@link #escapeBytes(com.googlecode.protobuf.format.ByteString)}. Two-digit hex escapes (starting with
-     * "\x") are also recognized.
-     */
-    static ByteString unescapeBytes(CharSequence input) throws InvalidEscapeSequence {
-        byte[] result = new byte[input.length()];
-        int pos = 0;
-        for (int i = 0; i < input.length(); i++) {
-            char c = input.charAt(i);
-            if (c == '\\') {
-                if (i + 1 < input.length()) {
-                    ++i;
-                    c = input.charAt(i);
-                    if (isOctal(c)) {
-                        // Octal escape.
-                        int code = digitValue(c);
-                        if ((i + 1 < input.length()) && isOctal(input.charAt(i + 1))) {
-                            ++i;
-                            code = code * 8 + digitValue(input.charAt(i));
-                        }
-                        if ((i + 1 < input.length()) && isOctal(input.charAt(i + 1))) {
-                            ++i;
-                            code = code * 8 + digitValue(input.charAt(i));
-                        }
-                        result[pos++] = (byte) code;
-                    } else {
-                        switch (c) {
-                            case 'a':
-                                result[pos++] = 0x07;
-                                break;
-                            case 'b':
-                                result[pos++] = '\b';
-                                break;
-                            case 'f':
-                                result[pos++] = '\f';
-                                break;
-                            case 'n':
-                                result[pos++] = '\n';
-                                break;
-                            case 'r':
-                                result[pos++] = '\r';
-                                break;
-                            case 't':
-                                result[pos++] = '\t';
-                                break;
-                            case 'v':
-                                result[pos++] = 0x0b;
-                                break;
-                            case '\\':
-                                result[pos++] = '\\';
-                                break;
-                            case '\'':
-                                result[pos++] = '\'';
-                                break;
-                            case '"':
-                                result[pos++] = '\"';
-                                break;
-
-                            case 'x':
-                                // hex escape
-                                int code = 0;
-                                if ((i + 1 < input.length()) && isHex(input.charAt(i + 1))) {
-                                    ++i;
-                                    code = digitValue(input.charAt(i));
-                                } else {
-                                    throw new InvalidEscapeSequence("Invalid escape sequence: '\\x' with no digits");
-                                }
-                                if ((i + 1 < input.length()) && isHex(input.charAt(i + 1))) {
-                                    ++i;
-                                    code = code * 16 + digitValue(input.charAt(i));
-                                }
-                                result[pos++] = (byte) code;
-                                break;
-
-                            default:
-                                throw new InvalidEscapeSequence("Invalid escape sequence: '\\" + c
-                                                                + "'");
-                        }
-                    }
-                } else {
-                    throw new InvalidEscapeSequence("Invalid escape sequence: '\\' at end of string.");
-                }
-            } else {
-                result[pos++] = (byte) c;
-            }
-        }
-
-        return ByteString.copyFrom(result, 0, pos);
-    }
-
-    /**
-     * Thrown by {@link JsonFormat#unescapeBytes} and {@link JsonFormat#unescapeText} when an
-     * invalid escape sequence is seen.
-     */
-    static class InvalidEscapeSequence extends IOException {
-
-        private static final long serialVersionUID = 1L;
-
-        public InvalidEscapeSequence(String description) {
-            super(description);
-        }
-    }
-
-    /**
-     * Like {@link #escapeBytes(com.googlecode.protobuf.format.ByteString)}, but escapes a text string.
-     * Non-ASCII characters are first encoded as UTF-8, then each byte is escaped individually as a
-     * 3-digit octal escape. Yes, it's weird.
-     */
-    static String escapeText(String input) {
-        return escapeBytes(ByteString.copyFromUtf8(input));
-    }
-
-    /**
-     * Un-escape a text string as escaped using {@link #escapeText(String)}. Two-digit hex escapes
-     * (starting with "\x") are also recognized.
-     */
-    static String unescapeText(String input) throws InvalidEscapeSequence {
-        return unescapeBytes(input).toStringUtf8();
-    }
-
-
-    /**
-     * Parse a 32-bit signed integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively.
-     */
-    static int parseInt32(String text) throws NumberFormatException {
-        return (int) parseInteger(text, true, false);
-    }
-
-    /**
-     * Parse a 32-bit unsigned integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively. The result is coerced to a (signed) {@code int}
-     * when returned since Java has no unsigned integer type.
-     */
-    static int parseUInt32(String text) throws NumberFormatException {
-        return (int) parseInteger(text, false, false);
-    }
-
-    /**
-     * Parse a 64-bit signed integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively.
-     */
-    static long parseInt64(String text) throws NumberFormatException {
-        return parseInteger(text, true, true);
-    }
-
-    /**
-     * Parse a 64-bit unsigned integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively. The result is coerced to a (signed) {@code long}
-     * when returned since Java has no unsigned long type.
-     */
-    static long parseUInt64(String text) throws NumberFormatException {
-        return parseInteger(text, false, true);
-    }
-
-    private static long parseInteger(String text, boolean isSigned, boolean isLong) throws NumberFormatException {
-        int pos = 0;
-
-        boolean negative = false;
-        if (text.startsWith("-", pos)) {
-            if (!isSigned) {
-                throw new NumberFormatException("Number must be positive: " + text);
-            }
-            ++pos;
-            negative = true;
-        }
-
-        int radix = 10;
-        if (text.startsWith("0x", pos)) {
-            pos += 2;
-            radix = 16;
-        } else if (text.startsWith("0", pos)) {
-            radix = 8;
-        }
-
-        String numberText = text.substring(pos);
-
-        long result = 0;
-        if (numberText.length() < 16) {
-            // Can safely assume no overflow.
-            result = Long.parseLong(numberText, radix);
-            if (negative) {
-                result = -result;
-            }
-
-            // Check bounds.
-            // No need to check for 64-bit numbers since they'd have to be 16 chars
-            // or longer to overflow.
-            if (!isLong) {
-                if (isSigned) {
-                    if ((result > Integer.MAX_VALUE) || (result < Integer.MIN_VALUE)) {
-                        throw new NumberFormatException("Number out of range for 32-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if ((result >= (1L << 32)) || (result < 0)) {
-                        throw new NumberFormatException("Number out of range for 32-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            }
-        } else {
-            BigInteger bigValue = new BigInteger(numberText, radix);
-            if (negative) {
-                bigValue = bigValue.negate();
-            }
-
-            // Check bounds.
-            if (!isLong) {
-                if (isSigned) {
-                    if (bigValue.bitLength() > 31) {
-                        throw new NumberFormatException("Number out of range for 32-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if (bigValue.bitLength() > 32) {
-                        throw new NumberFormatException("Number out of range for 32-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            } else {
-                if (isSigned) {
-                    if (bigValue.bitLength() > 63) {
-                        throw new NumberFormatException("Number out of range for 64-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if (bigValue.bitLength() > 64) {
-                        throw new NumberFormatException("Number out of range for 64-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            }
-
-            result = bigValue.longValue();
-        }
-
-        return result;
-    }
-}

文件差异内容过多而无法显示
+ 0 - 1208
app/src/main/java/com/googlecode/protobuf/format/JavaPropsFormat.java


文件差异内容过多而无法显示
+ 0 - 1512
app/src/main/java/com/googlecode/protobuf/format/JsonFormat.java


+ 0 - 568
app/src/main/java/com/googlecode/protobuf/format/JsonJacksonFormat.java

@@ -1,568 +0,0 @@
-package com.googlecode.protobuf.format;
-/* 
-   Copyright (c) 2011 NeuStar, Inc. All Rights Reserved.
-
-   Redistribution and use in source and binary forms, with or without modification, 
-    are permitted provided that the following conditions are met:
-
-        * Redistributions of source code must retain the above copyright notice, 
-          this list of conditions and the following disclaimer.
-        * Redistributions in binary form must reproduce the above copyright notice, 
-          this list of conditions and the following disclaimer in the documentation 
-          and/or other materials provided with the distribution.
-        * Neither the name of the NeuStar, Inc. nor the names of its contributors 
-          may be used to endorse or promote products derived from this software 
-          without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-import static com.googlecode.protobuf.format.util.TextUtils.*;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.math.BigInteger;
-import java.nio.charset.Charset;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import com.fasterxml.jackson.core.*;
-import com.google.protobuf.ByteString;
-import com.google.protobuf.Descriptors.Descriptor;
-import com.google.protobuf.Descriptors.EnumDescriptor;
-import com.google.protobuf.Descriptors.EnumValueDescriptor;
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.InvalidProtocolBufferException;
-import com.google.protobuf.Message;
-import com.google.protobuf.UnknownFieldSet;
-import com.googlecode.protobuf.format.util.TextUtils;
-
-/**
- * Provide ascii text parsing and formatting support for proto2 instances. The implementation
- * largely follows google/protobuf/text_format.cc.
- * <p>
- * (c) 2011 Neustar, Inc. All Rights Reserved.
- *
- * @author jeffrey.damick@neustar.biz Jeffrey Damick
- *         Based on the original code by:
- * @author eliran.bivas@gmail.com Eliran Bivas
- * @author aantonov@orbitz.com Alex Antonov
- *         <p>
- * @author wenboz@google.com Wenbo Zhu
- * @author kenton@google.com Kenton Varda
- */
-public class JsonJacksonFormat extends ProtobufFormatter {
-    private static JsonFactory jsonFactory = new JsonFactory();
-    private static final long MAX_UINT_VALUE = (((long) Integer.MAX_VALUE) << 1) + 1;
-    private static final BigInteger MAX_ULONG_VALUE =
-            BigInteger.valueOf(Long.MAX_VALUE).shiftLeft(1).add(BigInteger.ONE);
-
-    /**
-     * Outputs a Smile representation of the Protocol Message supplied into the parameter output.
-     * (This representation is the new version of the classic "ProtocolPrinter" output from the
-     * original Protocol Buffer system)
-     */
-    public void print(final Message message, OutputStream output, Charset cs) throws IOException {
-        JsonGenerator generator = createGenerator(output);
-    	print(message, generator);
-    	generator.close();
-    }
-
-    /**
-     * Outputs a Smile representation of the Protocol Message supplied into the parameter output.
-     * (This representation is the new version of the classic "ProtocolPrinter" output from the
-     * original Protocol Buffer system)
-     */
-    public void print(Message message, JsonGenerator generator) throws IOException {
-    	generator.writeStartObject();
-    	printMessage(message, generator);
-        generator.writeEndObject();
-        generator.flush();
-    }
-
-    /**
-     * Outputs a Smile representation of {@code fields} to {@code output}.
-     */
-    public void print(final UnknownFieldSet fields, OutputStream output, Charset cs) throws IOException {
-    	JsonGenerator generator = createGenerator(output);
-    	generator.writeStartObject();
-    	printUnknownFields(fields, generator);
-        generator.writeEndObject();
-        generator.close();
-    }
-
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     * @throws IOException
-     */
-    public void merge(InputStream input, Charset cs,
-    		ExtensionRegistry extensionRegistry, Message.Builder builder) throws IOException {
-
-    	JsonParser parser = jsonFactory.createJsonParser(input);
-    	merge(parser, extensionRegistry, builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     * @throws IOException
-     */
-    public void merge(JsonParser parser,
-    						 ExtensionRegistry extensionRegistry,
-                             Message.Builder builder) throws IOException {
-
-        JsonToken token = parser.nextToken();
-        if (token.equals(JsonToken.START_OBJECT)) {
-        	token = parser.nextToken();
-        }
-        while (token != null && !token.equals(JsonToken.END_OBJECT)) {
-        	mergeField(parser, extensionRegistry, builder);
-        	token = parser.nextToken();
-        }
-
-        // Test to make sure the tokenizer has reached the end of the stream.
-        if (parser.nextToken() != null) {
-            throw new RuntimeException("Expecting the end of the stream, but there seems to be more data!  Check the input for a valid JSON format.");
-        }
-    }
-
-
-
-    protected JsonGenerator createGenerator(OutputStream output) throws IOException {
-    	JsonGenerator generator = jsonFactory.createJsonGenerator(output, JsonEncoding.UTF8);
-    	generator.disable(JsonGenerator.Feature.AUTO_CLOSE_TARGET);
-    	return generator;
-    }
-
-
-    protected void printMessage(Message message, JsonGenerator generator) throws IOException {
-
-        for (Iterator<Map.Entry<FieldDescriptor, Object>> iter = message.getAllFields().entrySet().iterator(); iter.hasNext();) {
-            Map.Entry<FieldDescriptor, Object> field = iter.next();
-            printField(field.getKey(), field.getValue(), generator);
-        }
-        printUnknownFields(message.getUnknownFields(), generator);
-    }
-
-    public void printField(FieldDescriptor field, Object value, JsonGenerator generator) throws IOException {
-
-        printSingleField(field, value, generator);
-    }
-
-    private void printSingleField(FieldDescriptor field,
-                                         Object value,
-                                         JsonGenerator generator) throws IOException {
-        if (field.isExtension()) {
-            // We special-case MessageSet elements for compatibility with proto1.
-            if (field.getContainingType().getOptions().getMessageSetWireFormat()
-                && (field.getType() == FieldDescriptor.Type.MESSAGE) && (field.isOptional())
-                // object equality
-                && (field.getExtensionScope() == field.getMessageType())) {
-                generator.writeFieldName(field.getMessageType().getFullName());
-            } else {
-            	// extensions will have '.' in them, while normal fields wont..
-            	generator.writeFieldName(field.getFullName());
-            }
-        } else {
-            if (field.getType() == FieldDescriptor.Type.GROUP) {
-                // Groups must be serialized with their original capitalization.
-                generator.writeFieldName(field.getMessageType().getName());
-            } else {
-                generator.writeFieldName(field.getName());
-            }
-        }
-
-        // Done with the name, on to the value
-        if (field.isRepeated()) {
-            // Repeated field. Print each element.
-            generator.writeStartArray();
-            for (Iterator<?> iter = ((List<?>) value).iterator(); iter.hasNext();) {
-                printFieldValue(field, iter.next(), generator);
-            }
-            generator.writeEndArray();
-        } else {
-            printFieldValue(field, value, generator);
-        }
-    }
-
-    private void printFieldValue(FieldDescriptor field, Object value, JsonGenerator generator) throws IOException {
-    	// TODO: look at using field.getType().getJavaType(), to simplify this..
-    	switch (field.getType()) {
-            case INT32:
-            case SINT32:
-            case SFIXED32:
-            	generator.writeNumber((Integer)value);
-            	break;
-
-            case INT64:
-            case SINT64:
-            case SFIXED64:
-            	generator.writeNumber((Long)value);
-            	break;
-
-            case FLOAT:
-            	generator.writeNumber((Float)value);
-            	break;
-
-            case DOUBLE:
-            	generator.writeNumber((Double)value);
-            	break;
-
-            case BOOL:
-                // Good old toString() does what we want for these types.
-                generator.writeBoolean((Boolean)value);
-                break;
-
-            case UINT32:
-            case FIXED32:
-                //generator.writeNumber(Integer.toUnsignedLong((Integer)value));
-                generator.writeNumber(Long.parseLong(value.toString()));
-                break;
-
-            case UINT64:
-            case FIXED64:
-                generator.writeNumber(unsignedLong((Long) value));
-                break;
-
-            case STRING:
-            	generator.writeString((String) value);
-                break;
-
-            case BYTES: {
-            	// Here we break with JsonFormat - since there is an issue with non-utf8 bytes..
-            	generator.writeBinary(((ByteString)value).toByteArray());
-                break;
-            }
-
-            case ENUM: {
-            	generator.writeString(((EnumValueDescriptor) value).getName());
-                break;
-            }
-
-            case MESSAGE:
-            case GROUP:
-            	generator.writeStartObject();
-                printMessage((Message) value, generator);
-                generator.writeEndObject();
-                break;
-        }
-    }
-
-    protected void printUnknownFields(UnknownFieldSet unknownFields, JsonGenerator generator) throws IOException {
-        for (Map.Entry<Integer, UnknownFieldSet.Field> entry : unknownFields.asMap().entrySet()) {
-            UnknownFieldSet.Field field = entry.getValue();
-
-            generator.writeArrayFieldStart(entry.getKey().toString());
-            for (long value : field.getVarintList()) {
-                generator.writeNumber(value);
-            }
-            for (int value : field.getFixed32List()) {
-                generator.writeNumber(value);
-            }
-            for (long value : field.getFixed64List()) {
-                generator.writeNumber(value);
-            }
-            for (ByteString value : field.getLengthDelimitedList()) {
-            	// here we break with the JsonFormat to support non-utf8 bytes
-            	generator.writeBinary(value.toByteArray());
-            }
-            for (UnknownFieldSet value : field.getGroupList()) {
-                generator.writeStartObject();
-                printUnknownFields(value, generator);
-                generator.writeEndObject();
-            }
-            generator.writeEndArray();
-        }
-    }
-
-
-
-    // =================================================================
-    // Parsing
-
-
-    /**
-     * Parse a single field from {@code parser} and merge it into {@code builder}. If a ',' is
-     * detected after the field ends, the next field will be parsed automatically
-     * @throws IOException
-     * @throws JsonParseException
-     */
-    protected void mergeField(JsonParser parser,
-                                   ExtensionRegistry extensionRegistry,
-                                   Message.Builder builder) throws JsonParseException, IOException {
-        FieldDescriptor field = null;
-        Descriptor type = builder.getDescriptorForType();
-        boolean unknown = false;
-        ExtensionRegistry.ExtensionInfo extension = null;
-        JsonToken token = parser.getCurrentToken();
-
-        if (token != null) {
-            String name = parser.getCurrentName();
-
-            if (name.contains(".")) {
-            	// should be an extension
-            	extension = extensionRegistry.findExtensionByName(name);
-                if (extension == null) {
-                    throw new RuntimeException("Extension \""
-                    		+ name + "\" not found in the ExtensionRegistry.");
-                } else if (extension.descriptor.getContainingType() != type) {
-                    throw new RuntimeException("Extension \"" + name
-                    		+ "\" does not extend message type \""
-                    		+ type.getFullName() + "\".");
-                }
-
-            	field = extension.descriptor;
-            } else {
-            	field = type.findFieldByName(name);
-            }
-
-            // Group names are expected to be capitalized as they appear in the
-            // .proto file, which actually matches their type names, not their field
-            // names.
-            if (field == null) {
-                // Explicitly specify US locale so that this code does not break when
-                // executing in Turkey.
-                String lowerName = name.toLowerCase(Locale.US);
-                field = type.findFieldByName(lowerName);
-                // If the case-insensitive match worked but the field is NOT a group,
-                if ((field != null) && (field.getType() != FieldDescriptor.Type.GROUP)) {
-                    field = null;
-                }
-            }
-            // Again, special-case group names as described above.
-            if ((field != null) && (field.getType() == FieldDescriptor.Type.GROUP)
-                && !field.getMessageType().getName().equals(name)
-                && !field.getMessageType().getFullName().equalsIgnoreCase(name) /* extension */) {
-                field = null;
-            }
-
-            // Last try to lookup by field-index if 'name' is numeric,
-            // which indicates a possible unknown field
-            if (field == null && TextUtils.isDigits(name)) {
-                field = type.findFieldByNumber(Integer.parseInt(name));
-                unknown = true;
-            }
-
-            // no throwing exceptions if field not found, since it could be a different version.
-            if (field == null) {
-            	UnknownFieldSet.Builder unknownsBuilder = UnknownFieldSet.newBuilder();
-            	handleMissingField(name, parser, extensionRegistry, unknownsBuilder);
-            	builder.setUnknownFields(unknownsBuilder.build());
-            }
-        }
-
-        if (field != null) {
-        	token = parser.nextToken();
-
-            boolean array = token.equals(JsonToken.START_ARRAY);
-
-            if (array) {
-            	token = parser.nextToken();
-                while (!token.equals(JsonToken.END_ARRAY)) {
-                    handleValue(parser, extensionRegistry, builder, field, extension, unknown);
-                    token = parser.nextToken();
-                }
-            } else {
-                handleValue(parser, extensionRegistry, builder, field, extension, unknown);
-            }
-        }
-    }
-
-    private void handleMissingField(String fieldName, JsonParser parser,
-                                           ExtensionRegistry extensionRegistry,
-                                           UnknownFieldSet.Builder builder) throws IOException {
-
-        JsonToken token = parser.nextToken();
-        if (token.equals(JsonToken.START_OBJECT)) {
-            // Message structure
-        	token = parser.nextToken(); // skip name
-        	while (token != null && !token.equals(JsonToken.END_OBJECT)) {
-                handleMissingField(fieldName, parser, extensionRegistry, builder);
-                token = parser.nextToken(); // get } or field name
-            }
-        } else if (token.equals(JsonToken.START_ARRAY)) {
-            // Collection
-            do {
-                handleMissingField(fieldName, parser, extensionRegistry, builder);
-                token = parser.getCurrentToken(); // got value or ]
-            } while (token != null && !token.equals(JsonToken.END_ARRAY));
-        } else {
-            // Primitive value
-        	// NULL, INT, BOOL, STRING
-        	// nothing to do..
-        }
-    }
-
-    private void handleValue(JsonParser parser,
-                                    ExtensionRegistry extensionRegistry,
-                                    Message.Builder builder,
-                                    FieldDescriptor field,
-                                    ExtensionRegistry.ExtensionInfo extension,
-                                    boolean unknown) throws IOException {
-
-        Object value = null;
-        if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
-            value = handleObject(parser, extensionRegistry, builder, field, extension, unknown);
-        } else {
-            value = handlePrimitive(parser, field);
-        }
-        if (value != null) {
-            if (field.isRepeated()) {
-                builder.addRepeatedField(field, value);
-            } else {
-                builder.setField(field, value);
-            }
-        }
-    }
-
-    private Object handlePrimitive(JsonParser parser, FieldDescriptor field) throws IOException {
-        Object value = null;
-
-        JsonToken token = parser.getCurrentToken();
-
-        if (token.equals(JsonToken.VALUE_NULL)) {
-            return value;
-        }
-
-        switch (field.getType()) {
-            case INT32:
-            case SINT32:
-            case SFIXED32:
-            	value = parser.getIntValue();
-                break;
-
-            case INT64:
-            case SINT64:
-            case SFIXED64:
-            	value = parser.getLongValue();
-                break;
-
-            case UINT32:
-            case FIXED32:
-            	long valueLong = parser.getLongValue();
-            	if (valueLong < 0 || valueLong > MAX_UINT_VALUE) {
-            		throw new NumberFormatException("Number must be positive: " + valueLong);
-            	}
-            	value = (int) valueLong;
-                break;
-
-            case UINT64:
-            case FIXED64:
-            	BigInteger valueBigInt = parser.getBigIntegerValue();
-                // valueBigInt < 0 || valueBigInt > MAX_ULONG_VALUE
-            	if (valueBigInt.compareTo(BigInteger.ZERO) == -1 || valueBigInt.compareTo(MAX_ULONG_VALUE) == 1) {
-            		throw new NumberFormatException("Number must be positive: " + valueBigInt);
-            	}
-            	value = valueBigInt.longValue();
-                break;
-
-            case FLOAT:
-            	value = parser.getFloatValue();
-                break;
-
-            case DOUBLE:
-            	value = parser.getDoubleValue();
-                break;
-
-            case BOOL:
-            	value = parser.getBooleanValue();
-                break;
-
-            case STRING:
-            	value = parser.getText();
-                break;
-
-            case BYTES:
-            	value = ByteString.copyFrom(parser.getBinaryValue());
-                break;
-
-            case ENUM: {
-                EnumDescriptor enumType = field.getEnumType();
-                if (token.equals(JsonToken.VALUE_NUMBER_INT)) {
-                    int number = parser.getIntValue();
-                    value = enumType.findValueByNumber(number);
-                    if (value == null) {
-                        throw new RuntimeException("Enum type \""
-                        		+ enumType.getFullName()
-                        		+ "\" has no value with number "
-                        		+ number + ".");
-                    }
-                } else {
-                    String id = parser.getText();
-                    value = enumType.findValueByName(id);
-                    if (value == null) {
-                    	throw new RuntimeException("Enum type \""
-                    			+ enumType.getFullName()
-                    			+ "\" has no value named \""
-                    			+ id + "\".");
-                    }
-                }
-                break;
-            }
-
-            case MESSAGE:
-            case GROUP:
-                throw new RuntimeException("Can't get here.");
-        }
-        return value;
-    }
-
-
-    private Object handleObject(JsonParser parser,
-                                       ExtensionRegistry extensionRegistry,
-                                       Message.Builder builder,
-                                       FieldDescriptor field,
-                                       ExtensionRegistry.ExtensionInfo extension,
-                                       boolean unknown) throws IOException {
-
-        Message.Builder subBuilder;
-        if (extension == null) {
-            subBuilder = builder.newBuilderForField(field);
-        } else {
-            subBuilder = extension.defaultInstance.newBuilderForType();
-        }
-
-        JsonToken token = parser.getCurrentToken();
-        if (JsonToken.VALUE_NULL == token) {
-            return null;
-        }
-
-        if (unknown) {
-        	ByteString data = ByteString.copyFrom(parser.getBinaryValue());
-            try {
-                subBuilder.mergeFrom(data);
-                return subBuilder.build();
-            } catch (InvalidProtocolBufferException e) {
-                throw new RuntimeException("Failed to build " + field.getFullName() + " from " + data);
-            }
-        }
-
-        //token = parser.nextToken();
-        if (token.equals(JsonToken.START_OBJECT)) {
-	        token = parser.nextToken();
-	        while (token != null && !token.equals(JsonToken.END_OBJECT)) {
-	            mergeField(parser, extensionRegistry, subBuilder);
-	            token = parser.nextToken();
-	        }
-        }
-        return subBuilder.build();
-    }
-
-}

+ 0 - 155
app/src/main/java/com/googlecode/protobuf/format/ProtobufFormatter.java

@@ -1,155 +0,0 @@
-/*
-  Copyright 2000-2011 NeuStar, Inc. All rights reserved.
-  NeuStar, the Neustar logo and related names and logos are registered
-  trademarks, service marks or tradenames of NeuStar, Inc. All other
-  product names, company names, marks, logos and symbols may be trademarks
-  of their respective owners.
- */
-
-package com.googlecode.protobuf.format;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.Message;
-import com.google.protobuf.UnknownFieldSet;
-
-public abstract class ProtobufFormatter {
-    private Charset defaultCharset = Charset.defaultCharset();
-
-    /**
-     * Set the default character set to use for input / output data streams
-     * @param cs the character set to use by default, when unspecified
-     */
-    public void setDefaultCharset(Charset cs) {
-        defaultCharset = cs;
-    }
-    
-    /**
-     * Get the default character set to use for input / output streams
-     * @return the character set to use by default, when unspecified
-     */
-    public Charset getDefaultCharset() {
-        return defaultCharset;
-    }
-	
-	/**
-	 * @see print(Message, OutputStream, Charset)
-	 * @param message the protobuf message to format
-	 * @param output the stream to write the formatted message using the default charset
-	 * @throws IOException
-	 */
-	public void print(final Message message, OutputStream output) throws IOException {
-		print(message, output, defaultCharset);
-	}
-	
-	/**
-	 * Outputs a textual representation of the Protocol Message supplied into
-	 * the parameter output. (This representation is the new version of the
-	 * classic "ProtocolPrinter" output from the original Protocol Buffer system)
-	 * 
-	 * @param message the protobuf message to format
-	 * @param output the stream to write the formatted message
-	 * @param cs the character set to use
-	 * @throws IOException
-	 */
-	abstract public void print(final Message message, OutputStream output, Charset cs) throws IOException;
-
-	
-	/**
-	 * @see print(UnknownFieldSet, OutputStream, Charset)
-	 * @param fields unknown fields to format
-	 * @param output output the stream to write the formatted message using the default charset
-	 * @throws IOException
-	 */
-	public void print(final UnknownFieldSet fields, OutputStream output) throws IOException {
-		print(fields, output, defaultCharset);
-	}
-
-	/**
-	 * @param fields unknown fields to format
-	 * @param output output the stream to write the formatted message
-	 * @param cs the character set to use
-	 * @throws IOException
-	 */
-	abstract public void print(final UnknownFieldSet fields, OutputStream output, Charset cs) throws IOException;
-	
-
-	/**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-	public String printToString(final Message message) {
-		try {
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            print(message, out, defaultCharset);
-            out.flush();
-            return out.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-	}
-	
-	/**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-	public String printToString(final UnknownFieldSet fields) {
-		try {
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            print(fields, out, defaultCharset);
-            out.flush();
-            return out.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-	}
-	
-	/**
-     * Thrown when parsing an invalid text format message.
-     */
-    public static class ParseException extends IOException {
-    	private static final long serialVersionUID = 1L;
-
-		public ParseException(String message) {
-            super(message);
-        }
-    }
-	
-	
-	/**
-	 * Parse a text-format message from {@code input} and merge the contents
-	 * into {@code builder}.
-	 */
-	abstract public void merge(final InputStream input, Charset cs,
-			ExtensionRegistry extensionRegistry, 
-			final Message.Builder builder) throws IOException;
-
-	
-	/**
-	 * Parse a text-format message from {@code input} and merge the contents
-	 * into {@code builder}.
-	 */
-	public void merge(final InputStream input, Charset cs, 
-			final Message.Builder builder) throws IOException {
-		
-		merge(input, cs, ExtensionRegistry.getEmptyRegistry(), builder);
-	}
-	
-	public void merge(final InputStream input, 
-			final Message.Builder builder) throws IOException {
-		
-		merge(input, defaultCharset, 
-				ExtensionRegistry.getEmptyRegistry(), builder);
-	}
-	
-	public void merge(final InputStream input,
-			ExtensionRegistry extensionRegistry, 
-			final Message.Builder builder) throws IOException {
-		merge(input, defaultCharset, extensionRegistry, builder);
-	}
-}

+ 0 - 72
app/src/main/java/com/googlecode/protobuf/format/util/HexUtils.java

@@ -1,72 +0,0 @@
-/* 
-	Copyright (c) 2009, protobuf-java-format
-	All rights reserved.
-
-	Redistribution and use in source and binary forms, with or without modification, 
-	are permitted provided that the following conditions are met:
-
-		* Redistributions of source code must retain the above copyright notice, 
-		  this list of conditions and the following disclaimer.
-		* Redistributions in binary form must reproduce the above copyright notice, 
-		  this list of conditions and the following disclaimer in the documentation 
-		  and/or other materials provided with the distribution.
-		* Neither the name of the protobuf-java-format nor the names of its contributors 
-		  may be used to endorse or promote products derived from this software 
-		  without specific prior written permission.
-
-	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-	"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-	LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-	A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-	OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-	SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-	LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-	THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-	(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-	OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package com.googlecode.protobuf.format.util;
-
-import java.io.UnsupportedEncodingException;
-
-/**
- * Provide hex utility for converting bytes to hex string
- * <p>
- * (c) 2009-10 protobuf-java-format. All Rights Reserved.
- *
- * @author eliran.bivas@gmail.com Eliran Bivas
- *         <p>
- *         Based on the original code by:
- * 		   http://rgagnon.com/javadetails/java-0596.html
- */
-public final class HexUtils {
-
-	static final byte[] HEX_CHARS = { (byte) '0', (byte) '1', (byte) '2',
-			(byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7',
-			(byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c',
-			(byte) 'd', (byte) 'e', (byte) 'f' };
-	
-	public static String getHexString(byte raw, int minLength) {
-		byte[] hex = new byte[2];
-		int index = 0;
-		int v = raw & 0xFF;
-		hex[index++] = HEX_CHARS[v >>> 4];
-		hex[index++] = HEX_CHARS[v & 0xF];
-		try {
-			String hexString = new String(hex, "ASCII");
-			StringBuilder builder = new StringBuilder();
-			if ( hexString.length() < minLength) {
-				int hexLength = minLength - hexString.length();
-				while ( hexLength > 0) {
-					builder.append('0');
-					hexLength--;
-				}
-			}
-			return builder.append(hexString).toString();
-		} catch (UnsupportedEncodingException e) {
-			throw new IllegalStateException(e);
-		}
-	}
-
-}

+ 0 - 439
app/src/main/java/com/googlecode/protobuf/format/util/TextUtils.java

@@ -1,439 +0,0 @@
-/*
-  Copyright 2000-2011 NeuStar, Inc. All rights reserved.
-  NeuStar, the Neustar logo and related names and logos are registered
-  trademarks, service marks or tradenames of NeuStar, Inc. All other
-  product names, company names, marks, logos and symbols may be trademarks
-  of their respective owners.
- */
-
-package com.googlecode.protobuf.format.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.util.regex.Pattern;
-
-import com.google.protobuf.ByteString;
-
-/**
- * Utilities for coercing types
- * largely follows google/protobuf/text_format.cc.
- */
-public class TextUtils {
-    private static final Pattern DOUBLE_INFINITY = 
-            Pattern.compile("-?inf(inity)?", Pattern.CASE_INSENSITIVE);
-    private static final Pattern FLOAT_INFINITY = 
-          Pattern.compile("-?inf(inity)?f?", Pattern.CASE_INSENSITIVE);
-    private static final Pattern FLOAT_NAN = 
-          Pattern.compile("nanf?", Pattern.CASE_INSENSITIVE);
-    private static final Pattern DIGITS = 
-            Pattern.compile("[0-9]", Pattern.CASE_INSENSITIVE);
-    
-	/**
-     * Convert an unsigned 64-bit integer to a string.
-     */
-	 public static String unsignedToString(final long value) {
-        if (value >= 0) {
-            return Long.toString(value);
-        } else {
-            // Pull off the most-significant bit so that BigInteger doesn't think
-            // the number is negative, then set it again using setBit().
-            return BigInteger.valueOf(value & 0x7FFFFFFFFFFFFFFFL).setBit(63).toString();
-        }
-    }
-	 
-    /**
-     * Convert an unsigned 32-bit integer to a string.
-     */
-    public static String unsignedToString(final int value) {
-        if (value >= 0) {
-            return Integer.toString(value);
-        } else {
-            return Long.toString((value) & 0x00000000FFFFFFFFL);
-        }
-    }
-
-    /**
-     * Convert an unsigned 64-bit integer to a {@link BigInteger}.
-     */
-    public static BigInteger unsignedLong(long value) {
-        if (value < 0) {
-            // Pull off the most-significant bit so that BigInteger doesn't think
-            // the number is negative, then set it again using setBit().
-            return BigInteger.valueOf(value & 0x7FFFFFFFFFFFFFFFL).setBit(63);
-        }
-        return BigInteger.valueOf(value);
-    }
-
-    /** 
-     * Is this a hex digit? 
-     */
-    public static boolean isHex(final char c) {
-      return ('0' <= c && c <= '9') ||
-             ('a' <= c && c <= 'f') ||
-             ('A' <= c && c <= 'F');
-    }
-    
-    /** 
-     * Is this an octal digit? 
-     */
-    public static boolean isOctal(final char c) {
-      return '0' <= c && c <= '7';
-    }
-
-    /**
-     * Interpret a character as a digit (in any base up to 36) and return the
-     * numeric value.  This is like {@code Character.digit()} but we don't accept
-     * non-ASCII digits.
-     */
-    public static int digitValue(final char c) {
-      if ('0' <= c && c <= '9') {
-        return c - '0';
-      } else if ('a' <= c && c <= 'z') {
-        return c - 'a' + 10;
-      } else {
-        return c - 'A' + 10;
-      }
-    }
-    
-    public static boolean isDigits(final String text) {
-        return DIGITS.matcher(text).matches();
-    }
-    
-    private static final int BUFFER_SIZE = 4096;
-
-    // TODO(chrisn): See if working around java.io.Reader#read(CharBuffer)
-    // overhead is worthwhile
-    public static StringBuilder toStringBuilder(Readable input) throws IOException {
-        StringBuilder text = new StringBuilder();
-        CharBuffer buffer = CharBuffer.allocate(BUFFER_SIZE);
-        while (true) {
-            int n = input.read(buffer);
-            if (n == -1) {
-                break;
-            }
-            buffer.flip();
-            text.append(buffer, 0, n);
-        }
-        return text;
-    }
-    
-    public static InputStream toInputStream(String input) {
-    	return toInputStream(input, Charset.defaultCharset());
-    }
-    
-    public static InputStream toInputStream(String input, Charset cs) {
-        return new ByteArrayInputStream(input.getBytes(cs));
-    }
-    
-    
-    
-    /**
-     * If the next token is a double and return its value.
-     * Otherwise, throw a {@link NumberFormatException}.
-     */
-    public static double parseDouble(final String text) throws NumberFormatException {
-      // We need to parse infinity and nan separately because
-      // Double.parseDouble() does not accept "inf", "infinity", or "nan".
-      if (DOUBLE_INFINITY.matcher(text).matches()) {
-        final boolean negative = text.startsWith("-");
-        return negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY;
-      }
-      if (text.equalsIgnoreCase("nan")) {
-        return Double.NaN;
-      }
-
-      final double result = Double.parseDouble(text);
-      return result;
-    }
-
-    /**
-     * Parse a float and return its value.
-     * Otherwise, throw a {@link NumberFormatException}.
-     */
-    public static float parseFloat(final String text) throws NumberFormatException {
-      // We need to parse infinity and nan separately because
-      // Float.parseFloat() does not accept "inf", "infinity", or "nan".
-      if (FLOAT_INFINITY.matcher(text).matches()) {
-        final boolean negative = text.startsWith("-");
-        return negative ? Float.NEGATIVE_INFINITY : Float.POSITIVE_INFINITY;
-      }
-      if (FLOAT_NAN.matcher(text).matches()) {
-        return Float.NaN;
-      }
-
-      final float result = Float.parseFloat(text);
-      return result;
-    }
-    
-    /**
-     * Parse a boolean and return its value.
-     * Otherwise, throw a {@link IllegalArgumentException}.
-     */
-    public static boolean parseBoolean(final String text) throws IllegalArgumentException {
-      if (text.equalsIgnoreCase("true") || text.equalsIgnoreCase("t") ||
-              text.equals("1")) {
-        return true;
-      } else if (text.equalsIgnoreCase("false") || text.equalsIgnoreCase("f") ||
-              text.equals("0")) {
-        return false;
-      } else {
-        throw new IllegalArgumentException("Expected \"true\" or \"false\".");
-      }
-    }
-
-    
-    /**
-     * Parse a 32-bit signed integer from the text.  Unlike the Java standard
-     * {@code Integer.parseInt()}, this function recognizes the prefixes "0x"
-     * and "0" to signify hexidecimal and octal numbers, respectively.
-     */
-    public static int parseInt32(final String text) throws NumberFormatException {
-      return (int) parseInteger(text, true, false);
-    }
-
-    /**
-     * Parse a 32-bit unsigned integer from the text.  Unlike the Java standard
-     * {@code Integer.parseInt()}, this function recognizes the prefixes "0x"
-     * and "0" to signify hexidecimal and octal numbers, respectively.  The
-     * result is coerced to a (signed) {@code int} when returned since Java has
-     * no unsigned integer type.
-     */
-    public static int parseUInt32(final String text) throws NumberFormatException {
-      return (int) parseInteger(text, false, false);
-    }
-
-    /**
-     * Parse a 64-bit signed integer from the text.  Unlike the Java standard
-     * {@code Integer.parseInt()}, this function recognizes the prefixes "0x"
-     * and "0" to signify hexidecimal and octal numbers, respectively.
-     */
-    public static long parseInt64(final String text) throws NumberFormatException {
-      return parseInteger(text, true, true);
-    }
-
-    /**
-     * Parse a 64-bit unsigned integer from the text.  Unlike the Java standard
-     * {@code Integer.parseInt()}, this function recognizes the prefixes "0x"
-     * and "0" to signify hexidecimal and octal numbers, respectively.  The
-     * result is coerced to a (signed) {@code long} when returned since Java has
-     * no unsigned long type.
-     */
-    public static long parseUInt64(final String text) throws NumberFormatException {
-      return parseInteger(text, false, true);
-    }
-
-    public static long parseInteger(final String text,
-            final boolean isSigned, final boolean isLong) throws NumberFormatException {
-      int pos = 0;
-
-      boolean negative = false;
-      if (text.startsWith("-", pos)) {
-        if (!isSigned) {
-          throw new NumberFormatException("Number must be positive: " + text);
-        }
-        ++pos;
-        negative = true;
-      }
-
-      int radix = 10;
-      if (text.startsWith("0x", pos)) {
-        pos += 2;
-        radix = 16;
-      } else if (text.startsWith("0", pos)) {
-        radix = 8;
-      }
-
-      final String numberText = text.substring(pos);
-
-      long result = 0;
-      if (numberText.length() < 16) {
-        // Can safely assume no overflow.
-        result = Long.parseLong(numberText, radix);
-        if (negative) {
-          result = -result;
-        }
-
-        // Check bounds.
-        // No need to check for 64-bit numbers since they'd have to be 16 chars
-        // or longer to overflow.
-        if (!isLong) {
-          if (isSigned) {
-            if (result > Integer.MAX_VALUE || result < Integer.MIN_VALUE) {
-              throw new NumberFormatException(
-                "Number out of range for 32-bit signed integer: " + text);
-            }
-          } else {
-            if (result >= (1L << 32) || result < 0) {
-              throw new NumberFormatException(
-                "Number out of range for 32-bit unsigned integer: " + text);
-            }
-          }
-        }
-      } else {
-        BigInteger bigValue = new BigInteger(numberText, radix);
-        if (negative) {
-          bigValue = bigValue.negate();
-        }
-
-        // Check bounds.
-        if (!isLong) {
-          if (isSigned) {
-            if (bigValue.bitLength() > 31) {
-              throw new NumberFormatException(
-                "Number out of range for 32-bit signed integer: " + text);
-            }
-          } else {
-            if (bigValue.bitLength() > 32) {
-              throw new NumberFormatException(
-                "Number out of range for 32-bit unsigned integer: " + text);
-            }
-          }
-        } else {
-          if (isSigned) {
-            if (bigValue.bitLength() > 63) {
-              throw new NumberFormatException(
-                "Number out of range for 64-bit signed integer: " + text);
-            }
-          } else {
-            if (bigValue.bitLength() > 64) {
-              throw new NumberFormatException(
-                "Number out of range for 64-bit unsigned integer: " + text);
-            }
-          }
-        }
-
-        result = bigValue.longValue();
-      }
-
-      return result;
-    }
-    
-    /**
-     * Escapes bytes in the format used in protocol buffer text format, which is the same as the
-     * format used for C string literals. All bytes that are not printable 7-bit ASCII characters
-     * are escaped, as well as backslash, single-quote, and double-quote characters. Characters for
-     * which no defined short-hand escape sequence is defined will be escaped using 3-digit octal
-     * sequences.
-     */
-    public static String escapeBytes(final ByteString input) {
-        final StringBuilder builder = new StringBuilder(input.size());
-        for (int i = 0; i < input.size(); i++) {
-          final byte b = input.byteAt(i);
-          switch (b) {
-            // Java does not recognize \a or \v, apparently.
-            case 0x07: builder.append("\\a" ); break;
-            case '\b': builder.append("\\b" ); break;
-            case '\f': builder.append("\\f" ); break;
-            case '\n': builder.append("\\n" ); break;
-            case '\r': builder.append("\\r" ); break;
-            case '\t': builder.append("\\t" ); break;
-            case 0x0b: builder.append("\\v" ); break;
-            case '\\': builder.append("\\\\"); break;
-            case '\'': builder.append("\\\'"); break;
-            case '"' : builder.append("\\\""); break;
-            default:
-              // Note:  Bytes with the high-order bit set should be escaped.  Since
-              //   bytes are signed, such bytes will compare less than 0x20, hence
-              //   the following line is correct.
-              if (b >= 0x20) {
-                builder.append((char) b);
-              } else {
-                builder.append('\\');
-                builder.append((char) ('0' + ((b >>> 6) & 3)));
-                builder.append((char) ('0' + ((b >>> 3) & 7)));
-                builder.append((char) ('0' + (b & 7)));
-              }
-              break;
-          }
-        }
-        return builder.toString();
-    }
-    
-    /**
-     * Un-escape a byte sequence as escaped using
-     * {@link #escapeBytes(ByteString)}.  Two-digit hex escapes (starting with
-     * "\x") are also recognized.
-     */
-    public static ByteString unescapeBytes(final CharSequence charString) {
-      // First convert the Java characater sequence to UTF-8 bytes.
-      ByteString input = ByteString.copyFromUtf8(charString.toString());
-      // Then unescape certain byte sequences introduced by ASCII '\\'.  The valid
-      // escapes can all be expressed with ASCII characters, so it is safe to
-      // operate on bytes here.
-      //
-      // Unescaping the input byte array will result in a byte sequence that's no
-      // longer than the input.  That's because each escape sequence is between
-      // two and four bytes long and stands for a single byte.
-      final byte[] result = new byte[input.size()];
-      int pos = 0;
-      for (int i = 0; i < input.size(); i++) {
-        byte c = input.byteAt(i);
-        if (c == '\\') {
-          if (i + 1 < input.size()) {
-            ++i;
-            c = input.byteAt(i);
-            if (isOctal((char)c)) {
-              // Octal escape.
-              int code = digitValue((char) c);
-              if (i + 1 < input.size() && isOctal((char) input.byteAt(i + 1))) {
-                ++i;
-                code = code * 8 + digitValue((char) input.byteAt(i));
-              }
-              if (i + 1 < input.size() && isOctal((char) input.byteAt(i + 1))) {
-                ++i;
-                code = code * 8 + digitValue((char) input.byteAt(i));
-              }
-              // TODO: Check that 0 <= code && code <= 0xFF.
-              result[pos++] = (byte)code;
-            } else {
-              switch (c) {
-                case 'a' : result[pos++] = 0x07; break;
-                case 'b' : result[pos++] = '\b'; break;
-                case 'f' : result[pos++] = '\f'; break;
-                case 'n' : result[pos++] = '\n'; break;
-                case 'r' : result[pos++] = '\r'; break;
-                case 't' : result[pos++] = '\t'; break;
-                case 'v' : result[pos++] = 0x0b; break;
-                case '\\': result[pos++] = '\\'; break;
-                case '\'': result[pos++] = '\''; break;
-                case '"' : result[pos++] = '\"'; break;
-
-                case 'x':
-                  // hex escape
-                  int code = 0;
-                  if (i + 1 < input.size() && isHex((char) input.byteAt(i + 1))) {
-                    ++i;
-                    code = digitValue((char) input.byteAt(i));
-                  } else {
-                    throw new IllegalArgumentException(
-                        "Invalid escape sequence: '\\x' with no digits");
-                  }
-                  if (i + 1 < input.size() && isHex((char) input.byteAt(i + 1))) {
-                    ++i;
-                    code = code * 16 + digitValue((char) input.byteAt(i));
-                  }
-                  result[pos++] = (byte)code;
-                  break;
-
-                default:
-                  throw new IllegalArgumentException(
-                      "Invalid escape sequence: '\\" + (char)c + '\'');
-              }
-            }
-          } else {
-            throw new IllegalArgumentException(
-                "Invalid escape sequence: '\\' at end of string.");
-          }
-        } else {
-          result[pos++] = c;
-        }
-      }
-
-      return ByteString.copyFrom(result, 0, pos);
-    }
-
-}

+ 0 - 508
app/src/main/java/com/kfzs/duanduan/ActGameDetails.java

@@ -1,508 +0,0 @@
-package com.kfzs.duanduan;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.design.widget.AppBarLayout;
-import android.support.design.widget.CollapsingToolbarLayout;
-import android.support.design.widget.TabLayout;
-import android.support.v4.view.ViewPager;
-import android.support.v4.widget.NestedScrollView;
-import android.support.v7.widget.Toolbar;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.RatingBar;
-import android.widget.TextView;
-
-import com.android.volleyplus.Response;
-import com.android.volleyplus.VolleyError;
-import com.arialyy.annotations.Download;
-import com.arialyy.aria.core.Aria;
-import com.arialyy.aria.core.download.DownloadTask;
-import com.bumptech.glide.Glide;
-import com.kfzs.appstore.utils.restful.KFZSNetwork;
-import com.kfzs.duanduan.adp.AdpViewPagerDetail;
-import com.kfzs.duanduan.bean.BaseMsg;
-import com.kfzs.duanduan.bean.DownloadStatus;
-import com.kfzs.duanduan.bean.KFIntentKeys;
-import com.kfzs.duanduan.bean.UserRecord;
-import com.kfzs.duanduan.bll.UrlBll;
-import com.kfzs.duanduan.event.BigEvent;
-import com.kfzs.duanduan.event.EventDownloadHandler;
-import com.kfzs.duanduan.event.EventTypes;
-import com.kfzs.duanduan.fragment.FgtGameDetail;
-import com.kfzs.duanduan.proto.ApiResponseOuterClass;
-import com.kfzs.duanduan.proto.GameOuterClass;
-import com.kfzs.duanduan.utils.InstallButtonUtils;
-import com.kfzs.duanduan.utils.NumberFormatUtils;
-import com.kfzs.duanduan.utils.ShareUtils;
-import com.kfzs.duanduan.utils.dlg.DownBtnUtils;
-import com.kfzs.duanduan.utils.dlg.HelperUtils;
-import com.kfzs.duanduan.utils.net.APIRequest;
-import com.kfzs.duanduan.utils.net.APIRequestInstance;
-import com.kfzs.duanduan.utils.net.APIRequestV2;
-import com.kfzs.duanduan.utils.net.ResponseNetworkTask;
-import com.kfzs.duanduan.view.DialogStorageLow;
-import com.kfzs.duanduan.view.KFProgressButton;
-import com.kfzs.duanduan.view.ViewPagerAutoHeigh;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-
-import static com.kfzs.duanduan.bean.KFIntentKeys.EXTRA_PAGE_NUM;
-
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  ActGameDetails</p>
- * @ <p>Description: 商品详情页,已经重构了</p>
- * @ KFIntentKeys.EXTRA_GAME_ID 传商品Id
- * @ date:  2017/6/19 13:36
- * @ QQ:    315096953
- */
-public class ActGameDetails extends BaseCompatActivity {
-
-    private GameOuterClass.Game respGame;
-
-    private Boolean bShowDownloadBtn = true;
-
-    private String sGameId = "";
-    private Map<String, InstallButtonUtils> mInstallButtonMgr = new HashMap<>();
-    private UserRecord userRecord;
-
-    private int selectType = 0;//选择tab项0,1,2
-
-
-    @BindView(R.id.viewpager_act_game_details)
-    ViewPagerAutoHeigh mViewPager;
-
-    @BindView(R.id.img_act_game_details_logo)
-    ImageView mGameIcon;
-
-    @BindView(R.id.img_act_game_details_bg)
-    ImageView mImgBg;
-
-    @BindView(R.id.txt_act_game_details_name)
-    TextView mGameName;
-
-    @BindView(R.id.txt_act_game_details_types)
-    TextView mGameTags;
-
-    @BindView(R.id.img_back)
-    View mBack;
-
-    @BindView(R.id.img_share)
-    View mShare;
-
-    @BindView(R.id.txt_act_game_details_downcount)
-    TextView mGameDldCnt;
-
-    @BindView(R.id.ratb_act_game_details)
-    RatingBar mGameStars;
-
-    @BindView(R.id.downbtn_frg_fgt_app_detail_install)
-    KFProgressButton mBtnDown;
-
-
-    @BindView(R.id.toolbar_layout_act_game_details)
-    CollapsingToolbarLayout collapsingToolbarLayout;
-
-    @BindView(R.id.txt_act_game_details_title)
-    TextView mTxtTitle;
-
-    @BindView(R.id.tabLayout)
-    TabLayout tabLayout;
-    @BindView(R.id.nestedScrollView)
-    NestedScrollView nestedScrollView;
-
-    private EventDownloadHandler.OnDownCallback mOnDownCallback;
-    private FgtGameDetail mFragmentGameDetail;
-    private boolean mIsExpanded = false;//是否是折叠状态
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_game_details_parent);
-        ButterKnife.bind(this);
-
-        EventBus.getDefault().register(this);
-
-        bShowDownloadBtn = !getIntent().hasExtra(KFIntentKeys.EXTRA_GAME_REQUEST_ORDER);
-        selectType = getIntent().getIntExtra(EXTRA_PAGE_NUM, 0);
-        initView();
-        initData();
-        Aria.download(this).register();
-    }
-
-    private void initData() {
-        Intent intent = getIntent();
-        sGameId = intent.getStringExtra(KFIntentKeys.EXTRA_GAME_ID);
-        loadLoanUserercord(sGameId);
-
-        doNetworkTask(sGameId);
-    }
-
-    /**
-     * 初始化各组件
-     */
-    private void initView() {
-//        int height = HelperUtils.W * 310 / 720;
-//        mImgBg.setLayoutParams(new RelativeLayout.LayoutParams(HelperUtils.W, height));
-
-        setSupportActionBar((Toolbar) findViewById(R.id.toolbar_act_game_details));
-        if(mFragmentGameDetail == null){
-            mFragmentGameDetail = new FgtGameDetail();
-        }
-        AdpViewPagerDetail adpViewPagerDetail = new AdpViewPagerDetail(getSupportFragmentManager());
-        adpViewPagerDetail.add(mFragmentGameDetail, getString(R.string.app_details_details));
-//        adpViewPagerDetail.add(new FgtGift(), getString(R.string.app_details_user_gift));//小绵羊中注释掉用户礼包
-//        adpViewPagerDetail.add(new FgContinuePlay(), getString(R.string.continue_play));//小绵羊中注释掉借着玩
-        mViewPager.setOffscreenPageLimit(2);
-        mViewPager.setAdapter(adpViewPagerDetail);
-
-        mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
-            @Override
-            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
-
-            }
-
-            @Override
-            public void onPageSelected(int position) {
-                mViewPager.reSetHeight();
-            }
-
-            @Override
-            public void onPageScrollStateChanged(int state) {
-
-            }
-        });
-
-        /*
-          标题显示和隐藏的监听
-         */
-        ((AppBarLayout) findViewById(R.id.appbar_act_game_details)).addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
-            @Override
-            public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
-                if (Math.abs(verticalOffset) <
-                        appBarLayout.getTotalScrollRange() - HelperUtils.getDpiToPix(20)) {
-                    if (!mIsExpanded) {
-                        mIsExpanded = true;//修改状态标记为展开
-                        mTxtTitle.setVisibility(View.INVISIBLE);
-                    }
-                } else if (Math.abs(verticalOffset) >= appBarLayout.getTotalScrollRange()) {
-                    if (mIsExpanded) {
-                        mTxtTitle.setVisibility(View.VISIBLE);
-                        mIsExpanded = false;//修改状态标记为折叠
-                    }
-                }
-            }
-        });
-
-        tabLayout.setupWithViewPager(mViewPager);
-        tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
-            @Override
-            public void onTabSelected(TabLayout.Tab tab) {
-                selectType = tab.getPosition();
-//                G.showToast(tab.getPosition()+","+tab.getText());
-                Log.e("tab.getPosition()", tab.getPosition() + "");
-                setButtonStatue(tab.getPosition());
-
-            }
-
-            @Override
-            public void onTabUnselected(TabLayout.Tab tab) {
-
-            }
-
-            @Override
-            public void onTabReselected(TabLayout.Tab tab) {
-
-            }
-        });
-
-        mBack.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                onBackPressed();
-            }
-        });
-        mShare.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                popShare();
-            }
-        });
-
-
-        if (getIntent().hasExtra(EXTRA_PAGE_NUM)) {
-            mViewPager.setCurrentItem(selectType);
-        }
-    }
-
-    /**
-     * 设置button状态
-     */
-    private void setButtonStatue(int position){
-        if (position == 2) {
-//                    mBtnDown.setVisibility(View.GONE);
-            if (userRecord == null) {
-                return;
-            }
-            if (userRecord.getLoan_state() == 2 && userRecord.getHave_access_state() == 2) {//不允许借款
-//                        mBtnDown.setVisibility(View.GONE);
-            } else {
-//                        mBtnDown.setVisibility(View.VISIBLE);
-                if (userRecord.getHave_access_state() == 2) {//未借款
-                    mBtnDown.setText("去还款");
-                } else {
-                    mBtnDown.setText("去借款");
-                }
-            }
-            mBtnDown.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
-                    G.showToast(R.string.coming_soon);
-                }
-            });
-        } else {
-            if (!bShowDownloadBtn) {
-                mBtnDown.setVisibility(View.GONE);
-                return;
-            }
-            mBtnDown.setVisibility(View.VISIBLE);
-            if (respGame == null) {
-                return;
-            }
-//                    nestedScrollView.setNestedScrollingEnabled(true);
-            try {
-                DownBtnUtils.addDownloadBtnListener(mBtnDown, ActGameDetails.this,
-                        mInstallButtonMgr, respGame, "game_detail" + respGame.getId());
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    /**
-     * 分享游戏;
-     */
-    private void popShare() {
-        String shareUrl;
-        if (respGame != null && !TextUtils.isEmpty(respGame.getDownloadUrl())) {
-            shareUrl = respGame.getDownloadUrl();
-        } else if (respGame != null && !TextUtils.isEmpty(respGame.getBookDownloadUrl())) {
-            shareUrl = respGame.getBookDownloadUrl();
-        } else {
-            showToast("分享地址错误!");
-            return;
-        }
-        if (!TextUtils.isEmpty(shareUrl) && shareUrl.toLowerCase().startsWith("http")) {
-            new ShareUtils().showShareView(this, shareUrl, respGame.getGameName(),
-                    respGame.getIconImage(), respGame.getIntroduce());
-        } else {
-            String msg = "分享错误,请联系客服!\n错误链接为: " + shareUrl;
-            Log.w("DD_ERROR", msg);
-            showToast(msg);
-        }
-    }
-
-    @Override
-    public void onBackPressed() {
-        if (KFZSApp.actMain == null) {
-            Intent intent = new Intent(this, ActMain.class);
-            startActivity(intent);
-        }
-        this.finish();
-    }
-
-    private void doNetworkTask(final String sGameId) {
-
-        String reqUrl = UrlBll.AppStoreApi.GAME_LISTS + "/" + sGameId;
-
-        APIRequest bannerRequest = APIRequestInstance.getReq(TAG, reqUrl, null, new ResponseNetworkTask() {
-
-            @Override
-            public void onSuccess(ApiResponseOuterClass.ApiResponse apiResponse) {
-                respGame = apiResponse.getGame();
-                if (TextUtils.isEmpty(respGame.getGameName()) || isFinishing()) {
-                    return;
-                }
-
-
-                //                mImgIconGift.setVisibility(View.VISIBLE);
-                mGameName.setText(respGame.getGameName());
-                mTxtTitle.setText(respGame.getGameName());
-                mGameTags.setText(respGame.getTypeText());
-                mGameDldCnt.setText(" (" + String.format(getString(R.string.download_count), respGame.getDownloadNum() + "") + ")");
-                //                mGameSize.setText(respGame.getSize());
-                //                mGameDescription.setText(respGame.getIntroduce());
-                mGameStars.setRating(NumberFormatUtils.getDivideResult(respGame.getStar()));
-
-
-                Glide.with(ActGameDetails.this).load(respGame.getIconImage()).into(mGameIcon);
-
-                Glide.with(ActGameDetails.this).load(respGame.getDetailBackImage()).into(mImgBg);
-
-
-                mFragmentGameDetail.setData(respGame);
-
-
-                setButtonStatue(selectType);
-//                if (!bShowDownloadBtn) {
-//                    mBtnDown.setVisibility(View.GONE);
-//                    return;
-//                }
-//                mBtnDown.setVisibility(View.VISIBLE);
-//                DownBtnUtils.addDownloadBtnListener(mBtnDown, ActGameDetails.this,
-//                        mInstallButtonMgr, respGame, "game_detail" + respGame.getId());
-
-
-//               mInstallButtonMgr.put(respGame.getDownloadUrl(),
-//                        InstallButtonUtils.init("game_detail", respGame.getDownloadUrl(),
-//                                mBtnDown, "game_detail"));
-//
-//                DownBtnUtils.addDownloadBtnListener(mBtnDown, ActGameDetails.this, mInstallButtonMgr, respGame, "game_detail");
-//                GameStatusScanner scanner = new GameStatusScanner(ActGameDetails.this, mBtnDown, TAG) {
-//                    @Override
-//                    public void onButtonClickReturnListener(String downloadUrl, boolean bPaused, int percent) {
-//                        mBtnDown.updateButtonUI(bPaused ? KFProgressButton.STATUS.STATUS_PAUSED : KFProgressButton.STATUS.STATUS_INSTALLING);
-//                    }
-//                };
-//                scanner.compare(respGame);
-//                scanner.addListener();
-
-
-                if (respGame == null || TextUtils.isEmpty(respGame.getDownloadUrl())) {
-                    mBtnDown.setEnabled(false);
-                    mBtnDown.setText(getString(R.string.please_wait));
-                    mBtnDown.setVisibility(View.VISIBLE);
-                }
-            }
-
-            @Override
-            public void onFail(int code, String msg) {
-
-            }
-
-        }, HelperUtils.makeErr(getString(R.string.toast_init_data_fail)));
-
-        KFZSNetwork.addRequest(bannerRequest);
-
-    }
-
-
-    /**
-     * 安装按钮状态更新
-     *
-     * @param info
-     */
-    @Subscribe
-    public void onEventMainThread(DownloadStatus info) {
-        if (mOnDownCallback == null) {
-            mOnDownCallback = DownBtnUtils.installBtnStatus(mInstallButtonMgr);
-        }
-        EventDownloadHandler.newInstance(this, mOnDownCallback)
-                .setmTag(TAG).handlDownloadResult(info);
-    }
-
-    @Subscribe
-    public void onEventMainThread(BigEvent event) {
-        if (event.getEventTypes() == EventTypes.STORAGE_LOW) {
-            DialogStorageLow.showDialog(this);
-        }
-    }
-
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        EventBus.getDefault().unregister(this);
-    }
-
-    /**
-     * 获取借着完状态
-     * return 401:未登录 400:未绑定手机 200:成功
-     */
-    public void loadLoanUserercord(final String sGameId) {
-        String url = UrlBll.V2.BORROW_PLAY_LOAN_USERRECORD;
-        HashMap<String, String> m = new HashMap<>();
-        m.put("gameId", sGameId);
-        APIRequestV2 apiRequestV2 = APIRequestInstance.getReqUrlV2(url,
-                url, m, new Response.Listener<BaseMsg>() {
-                    @Override
-                    public void onResponse(BaseMsg baseMsg) {
-//                        doNetworkTask(sGameId);
-                        String s = baseMsg.getMsg();
-                        int code = baseMsg.getCode();
-                        switch (code) {
-                            case 400:
-//                                G.showToast("请绑定手机号");
-                                return;
-                            case 401:
-//                                G.showToast(baseMsg.getMsg() + "");
-                                return;
-                            case 200:
-                                UserRecord u = baseMsg.getData(UserRecord.class);
-                                if (u != null) {
-                                    userRecord = u;
-                                }
-                                break;
-                        }
-                    }
-                }, new Response.ErrorListener() {
-                    @Override
-                    public void onErrorResponse(VolleyError volleyError) {
-
-                    }
-                });
-        KFZSNetwork.addRequest(apiRequestV2);
-    }
-
-    /**
-     *
-     */
-    private boolean getFlagBorrow() {
-        if (userRecord == null) {
-            return false;
-        }
-        if (userRecord.getLoan_state() == 2 && userRecord.getHave_access_state() == 1) {
-            return true;
-        }
-        return false;
-    }
-
-    @Download.onTaskStop void stopDownload(DownloadTask task){
-        if(isThisGame(task)){
-            mBtnDown.setText("暂停");
-        }
-    }
-    @Download.onTaskStart void startDownload(DownloadTask task){
-        if(isThisGame(task)){
-            mBtnDown.setText("下载");
-        }
-    }
-
-    @Download.onTaskComplete void completeDownload(DownloadTask task){
-        if(isThisGame(task)){
-            mBtnDown.setText("安装");
-        }
-    }
-
-    @Download.onTaskRunning void runDownload(DownloadTask task){
-        if(isThisGame(task)){
-            mBtnDown.setText("下载中");
-        }
-    }
-    private boolean isThisGame(DownloadTask task){
-        return respGame != null && task != null && TextUtils.equals(task.getKey(), respGame.getDownloadUrl());
-    }
-}

+ 0 - 48
app/src/main/java/com/kfzs/duanduan/ActGategoryRank.java

@@ -1,48 +0,0 @@
-package com.kfzs.duanduan;
-
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentTransaction;
-
-import com.sheep.jiuyan.samllsheep.R;
-import com.kfzs.duanduan.BaseCompatActivity;
-import com.kfzs.duanduan.fragment.CategoryRankFragment;
-import com.kfzs.duanduan.utils.dlg.TitleBarUtils;
-
-/**
- * 游戏列表页面
- * Created by Administrator on 2017/12/13.
- */
-
-public class ActGategoryRank extends BaseCompatActivity {
-
-    public static final String INTENT_TYPE_ID="INTENT_TYPE_ID";
-
-    private int mIntGameTypeId=0;
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_game_lists_common);
-        mIntGameTypeId=getIntent().getIntExtra(INTENT_TYPE_ID,0);
-        TitleBarUtils.getInstance().setTitle(this, "分类");
-        TitleBarUtils.getInstance().setTitleFinish(this);
-        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
-        Bundle bundle = new Bundle();
-        bundle.putInt(INTENT_TYPE_ID, mIntGameTypeId);
-        Fragment fragment = getSupportFragmentManager().findFragmentByTag("tag");
-        if(fragment == null){
-            fragment = new CategoryRankFragment();
-            fragment.setArguments(bundle);
-            transaction.add(R.id.fragment_container, fragment, "tag");
-            transaction.commitAllowingStateLoss();
-        }else{
-            fragment.setArguments(bundle);
-            transaction.replace(R.id.fragment_container, fragment);
-            transaction.commitAllowingStateLoss();
-        }
-
-
-    }
-}

+ 0 - 158
app/src/main/java/com/kfzs/duanduan/ActMain.java

@@ -1,158 +0,0 @@
-package com.kfzs.duanduan;
-
-import android.content.Intent;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-
-import com.kfzs.appstore.utils.restful.KFZSNetwork;
-import com.kfzs.duanduan.event.BigEvent;
-import com.kfzs.duanduan.react.TabsHelper;
-import com.kfzs.duanduan.utils.dlg.HelperUtils;
-import com.kfzs.duanduan.view.DialogStorageLow;
-import com.sheep.gamegroup.absBase.BaseActivity;
-import com.sheep.gamegroup.model.entity.Container;
-import com.sheep.gamegroup.util.UMConfigUtils;
-import com.sheep.jiuyan.samllsheep.R;
-import com.umeng.socialize.UMShareAPI;
-
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import rx.functions.Action1;
-
-
-public class ActMain extends BaseActivity {
-    private static final String TAG = "ActMain";
-
-    @BindView(R.id.other_container)
-    LinearLayout other_container;
-
-    public final static String INTENT_GAME_ID = "INTEN_GAME_ID";
-
-
-    private ImageView mImgDot;//下载按钮的小红点
-
-
-
-    public TabsHelper tabsHelper;
-
-    @Override
-    protected int getLayoutId() {
-        return R.layout.activity_main;
-    }
-
-    @Override
-    public void initView() {
-        KFZSApp.actMain = this;
-        tabsHelper = new TabsHelper();
-        HelperUtils.init();//初始化屏幕的高,density等
-        ButterKnife.bind(this);
-        EventBus.getDefault().register(this);
-
-        mImgDot = findViewById(R.id.img_download_manager_dot);
-        tabsHelper.init();
-
-    }
-
-    @Override
-    public void initListener() {
-        findViewById(R.id.edt_main_search_enter).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                startActivity(new Intent(ActMain.this, ActSearch.class));
-            }
-        });
-        findViewById(R.id.img_download_manager).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                mImgDot.setVisibility(View.GONE);
-                startActivity(new Intent(ActMain.this, ActDownloadMgr.class));
-                UMConfigUtils.onEvent(UMConfigUtils.Event.GAME_DOWNLOAD_MANAGER);
-            }
-        });
-    }
-
-    @Override
-    public void initData() {
-
-    }
-
-
-    private Container<Action1<Integer>> container = new Container<>();
-
-    public Container<Action1<Integer>> getContainer() {
-        return container;
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        if(container != null && container.getT() != null)
-            container.getT().call(1);
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        if(container != null && container.getT() != null)
-            container.getT().call(2);
-    }
-
-    /**
-     * 传递事件
-     */
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        KFZSNetwork.stopByTag(TAG);
-        EventBus.getDefault().unregister(this);
-        if(container != null && container.getT() != null)
-            container.setT(null);
-    }
-
-
-    /**
-     * 主要的事件广播接收更新处理
-     *
-     * @param event
-     */
-    @Subscribe
-    public void onEventMainThread(BigEvent event) {
-        switch (event.getEventTypes()) {
-            case TIPS_DOWN_ICON:
-                mImgDot.setVisibility(View.VISIBLE);
-                break;
-            case STORAGE_LOW:
-                DialogStorageLow.showDialog(this);
-                break;
-        }
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        super.onNewIntent(intent);
-        setIntent(intent);
-        if (intent.hasExtra(INTENT_GAME_ID)) {
-            tabsHelper.goToPostion(intent.getIntExtra(INTENT_GAME_ID, 0));
-        } else {
-            recreate();
-        }
-    }
-
-    /**
-     *
-     */
-    @Override
-    public void onBackPressed() {
-        tabsHelper.onBackPressed();
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        UMShareAPI.get(this).onActivityResult(requestCode, resultCode, data);
-    }
-}

+ 0 - 308
app/src/main/java/com/kfzs/duanduan/BaseCompatActivity.java

@@ -1,308 +0,0 @@
-package com.kfzs.duanduan;
-
-import android.content.pm.ActivityInfo;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentTransaction;
-import android.util.Log;
-import android.view.View;
-
-import com.kf.utils.ToastBuilder;
-import com.kfzs.android.view.CompatActivity;
-
-import java.util.List;
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by sinlov on 17/2/10.
- */
-public abstract class BaseCompatActivity extends CompatActivity {
-
-    /**
-     * auto TAG for mark subclass
-     */
-    protected String TAG;
-
-    public static boolean isDebugMode = false;
-    private static final int FINISH_BACK_STACK_THRESHOLD = 0;
-
-    private FragmentManager fragmentManager = getSupportFragmentManager();
-    private FragmentTransaction fragmentTransaction;
-    private boolean isAddStack = false;
-    /**
-     * supper application see {@link KFZSApp}
-     */
-    protected KFZSApp app;
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-//        StatusBarUtils.setColor(this, ThemeUtils.getInstance().getColorDark(), 0);
-        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
-        super.onCreate(savedInstanceState);
-
-        TAG = this.getClass().getCanonicalName();
-        app = KFZSApp.getInstance();
-    }
-
-    /**
-     * 不如注入方便,暂时这样用吧。。。
-     *
-     * @param id
-     * @param <T>
-     * @return
-     */
-    protected <T extends View> T findViewByIdT(int id) {
-        return super.findViewById(id);
-    }
-
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, boolean isSupportBackButton) {
-        addSupportFragment(containerViewId, fragment, null, isSupportBackButton);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, boolean isSupportBackButton, Integer animIn, Integer animOut) {
-        addSupportFragment(containerViewId, fragment, null, isSupportBackButton, animIn, animOut);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, String tag, boolean isSupportBackButton, String stackTag) {
-        addSupportFragment(containerViewId, fragment, null, tag, isSupportBackButton, stackTag, null, null);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, boolean isSupportBackButton, String stackTag) {
-        addSupportFragment(containerViewId, fragment, null, null, isSupportBackButton, stackTag, null, null);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, boolean isSupportBackButton) {
-        addSupportFragment(containerViewId, fragment, bundle, null, isSupportBackButton);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, boolean isSupportBackButton, Integer animIn, Integer animOut) {
-        addSupportFragment(containerViewId, fragment, bundle, null, isSupportBackButton, animIn, animOut);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, String tag, boolean isSupportBackButton) {
-        addSupportFragment(containerViewId, fragment, bundle, tag, isSupportBackButton, null);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, boolean isSupportBackButton, String stackTag) {
-        addSupportFragment(containerViewId, fragment, bundle, null, isSupportBackButton, stackTag);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, String tag, boolean isSupportBackButton, String stackTag, Integer animIn, Integer animOut) {
-        addSupportFragment(containerViewId, fragment, null, tag, isSupportBackButton, stackTag, animIn, animOut);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, boolean isSupportBackButton, String stackTag, Integer animIn, Integer animOut) {
-        addSupportFragment(containerViewId, fragment, null, null, isSupportBackButton, stackTag, animIn, animOut);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, String tag, boolean isSupportBackButton, String stackTag) {
-        addSupportFragment(containerViewId, fragment, bundle, tag, isSupportBackButton, stackTag, null, null);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, boolean isSupportBackButton, String stackTag, Integer animIn, Integer animOut) {
-        addSupportFragment(containerViewId, fragment, bundle, null, isSupportBackButton, stackTag, animIn, animOut);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, String tag, boolean isSupportBackButton, Integer animIn, Integer animOut) {
-        addSupportFragment(containerViewId, fragment, bundle, tag, isSupportBackButton, null, animIn, animOut);
-    }
-
-    public void addSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, String tag, boolean isSupportBackButton, String stackTag, Integer animIn, Integer animOut) {
-        if (null == fragment) {
-            new Throwable("your fragment is null").printStackTrace();
-            return;
-        }
-        fragmentTransaction = fragmentManager.beginTransaction();
-        if (null != bundle) {
-            fragment.setArguments(bundle);
-        }
-        fragmentTransaction.add(containerViewId, fragment, tag);
-        if (null != animIn && null != animOut) {
-            fragmentTransaction.setCustomAnimations(animIn, animOut);
-        }
-        if (isSupportBackButton) {
-            fragmentTransaction.addToBackStack(stackTag);
-            fragmentTransaction.commit();
-            isAddStack = true;
-        } else {
-            removeChildFragment();
-            isAddStack = false;
-        }
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, boolean isSupportBackButton) {
-        replaceSupportFragment(containerViewId, fragment, null, isSupportBackButton);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, boolean isSupportBackButton, Integer animIn, Integer animOut) {
-        replaceSupportFragment(containerViewId, fragment, null, isSupportBackButton, animIn, animOut);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, String tag, boolean isSupportBackButton, String stackTag) {
-        replaceSupportFragment(containerViewId, fragment, null, tag, isSupportBackButton, stackTag, null, null);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, boolean isSupportBackButton, String stackTag) {
-        replaceSupportFragment(containerViewId, fragment, null, null, isSupportBackButton, stackTag, null, null);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, boolean isSupportBackButton) {
-        replaceSupportFragment(containerViewId, fragment, bundle, null, isSupportBackButton);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, boolean isSupportBackButton, Integer animIn, Integer animOut) {
-        replaceSupportFragment(containerViewId, fragment, bundle, null, isSupportBackButton, animIn, animOut);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, String tag, boolean isSupportBackButton) {
-        replaceSupportFragment(containerViewId, fragment, bundle, tag, isSupportBackButton, null);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, boolean isSupportBackButton, String stackTag) {
-        replaceSupportFragment(containerViewId, fragment, bundle, null, isSupportBackButton, stackTag);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, String tag, boolean isSupportBackButton, String stackTag, Integer animIn, Integer animOut) {
-        replaceSupportFragment(containerViewId, fragment, null, tag, isSupportBackButton, stackTag, animIn, animOut);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, boolean isSupportBackButton, String stackTag, Integer animIn, Integer animOut) {
-        replaceSupportFragment(containerViewId, fragment, null, null, isSupportBackButton, stackTag, animIn, animOut);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, String tag, boolean isSupportBackButton, String stackTag) {
-        replaceSupportFragment(containerViewId, fragment, bundle, tag, isSupportBackButton, stackTag, null, null);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, boolean isSupportBackButton, String stackTag, Integer animIn, Integer animOut) {
-        replaceSupportFragment(containerViewId, fragment, bundle, null, isSupportBackButton, stackTag, animIn, animOut);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, String tag, boolean isSupportBackButton, Integer animIn, Integer animOut) {
-        replaceSupportFragment(containerViewId, fragment, bundle, tag, isSupportBackButton, null, animIn, animOut);
-    }
-
-    public void replaceSupportFragment(int containerViewId, BaseCompatFragment fragment, Bundle bundle, String tag, boolean isSupportBackButton, String stackTag, Integer animIn, Integer animOut) {
-        if (null == fragment) {
-            new Throwable("your fragment is null").printStackTrace();
-        }
-        fragmentTransaction = fragmentManager.beginTransaction();
-        if (null != bundle) {
-            assert fragment != null;
-            fragment.setArguments(bundle);
-        }
-        if (null != animIn && null != animOut) {
-            fragmentTransaction.setCustomAnimations(animIn, animOut);
-        }
-        fragmentTransaction.replace(containerViewId, fragment, tag);
-        if (isSupportBackButton) {
-            fragmentTransaction.addToBackStack(stackTag);
-            fragmentTransaction.commit();
-            isAddStack = true;
-        } else {
-            removeChildFragment();
-            isAddStack = false;
-        }
-    }
-
-    private void removeChildFragment() {
-        fragmentManager.popBackStackImmediate();
-        List<Fragment> childFragments = fragmentManager.getFragments();
-        if (null != childFragments) {
-            for (Fragment stackFragment : fragmentManager.getFragments()) {
-                if (null != stackFragment) {
-                    fragmentTransaction.remove(stackFragment);
-                }
-            }
-        }
-        fragmentTransaction.commit();
-    }
-
-    public void removeSupportFragment(BaseCompatFragment fragment) {
-        fragmentTransaction = fragmentManager.beginTransaction();
-        fragmentTransaction.remove(fragment);
-        fragmentTransaction.commit();
-    }
-
-    public void removeAllFragment() {
-        int backStackEntryCount = fragmentManager.getBackStackEntryCount();
-        if (backStackEntryCount > 0) {
-            fragmentManager.popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
-        }
-    }
-
-    public void hideSupportFragment(BaseCompatFragment fragment) {
-        fragmentTransaction = fragmentManager.beginTransaction();
-        fragmentTransaction.hide(fragment);
-        fragmentTransaction.commit();
-    }
-
-    @Override
-    public void onBackPressed() {
-        super.onBackPressed();
-        if (isDebugMode) {
-            Log.d(TAG, "isAddStack: " + isAddStack + " |BackStackEntryCount: " + fragmentManager.getBackStackEntryCount());
-        }
-        if (!isAddStack || FINISH_BACK_STACK_THRESHOLD == fragmentManager.getBackStackEntryCount()) {
-            finish();
-        }
-        //TODO of synchronized way
-        synchronized (this) {
-        }
-    }
-
-    /**
-     * show toast by string
-     *
-     * @param string toast string
-     */
-    protected void showToast(String string) {
-        showToast(string, ToastBuilder.DEFAULT_TOAST_SINGLE);
-    }
-
-
-    /**
-     * show toast by res
-     *
-     * @param string string resource id
-     * @param tag    {@link ToastBuilder#DEFAULT_TOAST} or other
-     */
-    protected void showToast(String string, int tag) {
-        ToastBuilder.make(app, string, tag);
-    }
-
-    /**
-     * show toast by res
-     *
-     * @param strID string resource id
-     */
-    protected void showToast(int strID) {
-        showToast(strID, ToastBuilder.DEFAULT_TOAST_SINGLE);
-    }
-
-    /**
-     * show toast by res
-     *
-     * @param strID string resource id
-     * @param tag   {@link ToastBuilder#DEFAULT_TOAST} or other
-     */
-    protected void showToast(int strID, int tag) {
-        ToastBuilder.make(app, strID, tag);
-    }
-}

+ 0 - 263
app/src/main/java/com/kfzs/duanduan/BaseCompatFragment.java

@@ -1,263 +0,0 @@
-package com.kfzs.duanduan;
-
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.annotation.IdRes;
-import android.support.annotation.LayoutRes;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.widget.SwipeRefreshLayout;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-import com.kf.utils.ToastBuilder;
-import com.kfzs.duanduan.bean.KFIntentKeys;
-import com.sheep.gamegroup.util.UMConfigUtils;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import java.lang.reflect.Field;
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by sinlov on 17/2/13.
- */
-public abstract class BaseCompatFragment extends Fragment {
-
-    private static final String STATE_SAVE_IS_HIDDEN = "Fragment:STATE:SAVE_IS_HIDDEN";
-
-    protected final String TAG = this.getClass().getCanonicalName();
-
-    //Fragment主要管理
-    protected FragmentManager mFragmentManager;
-    //Fragment的主View
-    protected View mContentView;
-
-    protected Context mContext;
-
-    //刷新组件,直接static
-    private static SwipeRefreshLayout mSwipeRefreshLayout;
-
-
-    /**
-     * attach fragment and init base member
-     *
-     * @param context context
-     */
-    @Override
-    public void onAttach(Context context) {
-        super.onAttach(context);
-        this.mContext = context;
-        mFragmentManager = getFragmentManager();
-    }
-
-    @Override
-    public void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        if (savedInstanceState != null) {
-            boolean isSupportHidden = savedInstanceState.getBoolean(STATE_SAVE_IS_HIDDEN);
-            FragmentManager fragmentmanager = getFragmentManager();
-            if(fragmentmanager != null) {
-                FragmentTransaction ft = fragmentmanager.beginTransaction();
-                if (isSupportHidden) {
-                    ft.hide(this);
-                } else {
-                    ft.show(this);
-                }
-                ft.commitAllowingStateLoss();
-            }
-        }
-    }
-
-    /**
-     * @param inflater
-     * @param container
-     * @param savedInstanceState
-     * @return
-     */
-    @Nullable
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
-        if (mContentView == null) {
-            initView(savedInstanceState);
-        } else {
-            ViewGroup parent = (ViewGroup) mContentView.getParent();
-            if (null != parent) {
-                parent.removeView(mContentView);
-            }
-        }
-        return mContentView;
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        if(getUserVisibleHint()){
-            UMConfigUtils.onVisibilityChangedToUser(true, TAG);
-        }
-    }
-
-    @Override
-    public void onPause() {
-        super.onPause();
-        if(getUserVisibleHint()){
-            UMConfigUtils.onVisibilityChangedToUser(false, TAG);
-        }
-    }
-
-    protected abstract void initView(Bundle savedInstanceState);
-
-    @Override
-    public void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-        outState.putBoolean(STATE_SAVE_IS_HIDDEN, isHidden());
-    }
-
-    protected void setContentView(@LayoutRes int layoutResID) {
-//        mContentView = LayoutInflater.from(KFZSApp.getInstance()).inflate(layoutResID, null);
-        //上面句大坑,在做主题的时候搞了很久,我去!
-        mContentView = LayoutInflater.from(getActivity()).inflate(layoutResID, null);
-    }
-
-    protected void setContentViewChildMode(@LayoutRes int layoutResID) {
-        mContentView = LayoutInflater.from(getActivity()).inflate(layoutResID, null);
-    }
-
-    @Override
-    public void onDetach() {
-        super.onDetach();
-        try {
-            Field childFragmentManager = Fragment.class.getDeclaredField("mChildFragmentManager");
-            childFragmentManager.setAccessible(true);
-            childFragmentManager.set(this, null);
-        } catch (NoSuchFieldException e) {
-            e.printStackTrace();
-        } catch (IllegalAccessException e) {
-            e.printStackTrace();
-        }
-    }
-
-
-
-    /**
-     * find view by id which in content view
-     *
-     * @param id   view id
-     * @param <CV> extends {@link View}
-     * @return extends view
-     */
-    @SuppressWarnings("unchecked")
-    protected <CV extends View> CV getViewById(@IdRes int id) {
-        return (CV) mContentView.findViewById(id);
-    }
-
-    /**
-     * show toast by string
-     *
-     * @param string toast string
-     */
-    protected void showToast(String string) {
-        G.showToast(string);
-    }
-
-
-    /**
-     * show toast by res
-     *
-     * @param string string resource id
-     * @param tag    {@link ToastBuilder#DEFAULT_TOAST} or other
-     */
-    protected void showToast(String string, int tag) {
-        ToastBuilder.make(mContext, string, tag);
-    }
-
-    /**
-     * show toast by res
-     *
-     * @param strID string resource id
-     */
-    protected void showToast(int strID) {
-        showToast(strID, ToastBuilder.DEFAULT_TOAST_SINGLE);
-    }
-
-    /**
-     * show toast by res
-     *
-     * @param strID string resource id
-     * @param tag   {@link ToastBuilder#DEFAULT_TOAST} or other
-     */
-    protected void showToast(int strID, int tag) {
-        ToastBuilder.make(mContext, strID, tag);
-    }
-
-
-    protected void skip2GameDetails(int sGameId) {
-        Intent intent = new Intent(mContext, ActGameDetails.class);
-        intent.putExtra(KFIntentKeys.EXTRA_GAME_ID, String.valueOf(sGameId));
-        startActivity(intent);
-    }
-
-    protected void skip2Activity(Class<?> cls) {
-        skip2Activity(cls, null);
-    }
-
-    protected void skip2Activity(Class<?> cls, Bundle bundle) {
-        Intent intent = new Intent(getActivity(), cls);
-        if (null != bundle) {
-            intent.putExtras(bundle);
-        }
-        startActivity(intent);
-    }
-
-
-    /**
-     * 刷新数据
-     */
-    public void refreshData() {
-
-    }
-
-    /**
-     * 刷新结束
-     */
-    public void refreshOver() {
-        if (mSwipeRefreshLayout != null
-                && mSwipeRefreshLayout.isRefreshing()) {
-            mSwipeRefreshLayout.setRefreshing(false);
-        }
-    }
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-    }
-
-    /**
-     * 设置刷新组件
-     *
-     * @param swipeRefreshLayout
-     */
-    public void setmSwipeRefreshLayout(SwipeRefreshLayout swipeRefreshLayout) {
-        mSwipeRefreshLayout = swipeRefreshLayout;
-    }
-
-    public static SwipeRefreshLayout getmSwipeRefreshLayout() {
-        return mSwipeRefreshLayout;
-    }
-}

+ 0 - 79
app/src/main/java/com/kfzs/duanduan/CompatActivity.java

@@ -1,79 +0,0 @@
-package com.kfzs.duanduan;
-
-import android.content.Intent;
-import android.content.pm.ActivityInfo;
-import android.os.Bundle;
-import android.support.annotation.IdRes;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.util.Log;
-import android.view.View;
-import android.widget.Toast;
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by "sinlov" on 16/6/30.
- */
-public abstract class CompatActivity extends AppCompatActivity {
-
-    private long testTimeUse;
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
-    }
-
-    /**
-     * @param id   widget id
-     * @param <VT> View
-     * @return extends {@link View}
-     */
-    @SuppressWarnings("unchecked")
-    protected <VT extends View> VT getViewById(@IdRes int id) {
-        return (VT) findViewById(id);
-    }
-
-    protected void showToast(String text) {
-        Toast.makeText(this.getApplicationContext(), text, Toast.LENGTH_SHORT).show();
-    }
-
-    protected void showToast(int id) {
-        Toast.makeText(this.getApplicationContext(), id, Toast.LENGTH_SHORT).show();
-    }
-
-    protected void skip2Activity(Class<?> cls) {
-        skip2Activity(cls, null);
-    }
-
-    protected void skip2Activity(Class<?> cls, Bundle bundle) {
-        Intent intent = new Intent(CompatActivity.this, cls);
-        if (null != bundle) {
-            intent.putExtras(bundle);
-        }
-        startActivity(intent);
-    }
-
-    protected void testTimeUseStart() {
-        testTimeUse = System.currentTimeMillis();
-    }
-
-    protected long testTimeUseEnd() {
-        long useTime = System.currentTimeMillis() - testTimeUse;
-        Log.d("CompatActivity", "testTimeUse: " + useTime);
-        return useTime;
-    }
-}

+ 0 - 166
app/src/main/java/com/kfzs/duanduan/KFZSApp.java

@@ -1,166 +0,0 @@
-package com.kfzs.duanduan;
-
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageInfo;
-import android.os.Environment;
-import android.support.multidex.MultiDexApplication;
-import android.util.DisplayMetrics;
-import android.util.Log;
-
-import com.arialyy.aria.core.Aria;
-import com.kfzs.appstore.utils.restful.KFZSNetwork;
-import com.kfzs.duanduan.utils.ApkUtils;
-import com.sheep.gamegroup.util.ActivityManager;
-import com.sheep.jiuyan.samllsheep.BuildConfig;
-import com.sheep.jiuyan.samllsheep.service.DownloadService;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by sinlov on 17/2/10.
- */
-public class KFZSApp extends MultiDexApplication {
-
-    public static final boolean DEBUG = BuildConfig.DEBUG;
-
-    public static final String SD_PATH_EXTERNAL = Environment.getExternalStorageDirectory()
-            .getAbsolutePath();
-    private static KFZSApp application;
-    public static Context context;
-    public static String TAG;
-    public static String ownPath;
-    public static String path_catch;
-    public static String path_img;
-    public static String path_img_catch;
-    public static String path_download;
-    public static String path_Log;
-    public static ActMain actMain;
-
-
-    public static final int MAX_DOWNLOAD_TASK_SIZE = 5;
-    public HashMap<String, String> mRealDownloadUrl;
-
-    @Override
-    public void onCreate() {
-        super.onCreate();
-        TAG = this.getPackageName();
-        mRealDownloadUrl = new HashMap<>();
-        setOnlyContext(this);
-        initUtils();
-        initOwnCatchPath();
-        startService(new Intent(this, DownloadService.class));
-    }
-
-    private void initUtils() {
-        KFZSNetwork.init(application);
-        DisplayMetrics metric = getResources().getDisplayMetrics();
-        G.DENSITY = metric.density;
-        G.DENSITY_DPI = metric.densityDpi;
-        boolean isHeightBig = metric.heightPixels > metric.widthPixels;
-        G.HEIGHT = isHeightBig ? metric.heightPixels : metric.widthPixels;
-        G.WIDTH = isHeightBig ? metric.widthPixels : metric.heightPixels;
-    }
-
-    /**
-     * get MDLApplication instance
-     *
-     * @return {@link KFZSApp}
-     */
-    public static KFZSApp getInstance() {
-        return application;
-    }
-
-
-    /**
-     * quit app safe
-     */
-    public void quit() {
-        try {
-            Aria.download(this).stopAllTask();
-            ActivityManager.getInstance().finishAllActivity();
-        } catch (Exception e) {
-            Log.e(TAG, "quit error" + e.getMessage() + "\n" + e.getCause());
-        } finally {
-            Log.v(TAG, "App quite");
-        }
-
-    }
-
-    private static void setContext(Context context) {
-        KFZSApp.context = context;
-    }
-
-    private void setOnlyContext(Context context) {
-        setContext(context);
-    }
-
-    private void initOwnCatchPath() {
-        initOwnPath();
-        File appPath = new File(path_catch);
-        if (!appPath.exists()) {
-            appPath.mkdirs();
-        }
-    }
-
-    private void initOwnPath() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(SD_PATH_EXTERNAL);
-        sb.append("/Android/data/");
-        sb.append(TAG);
-        ownPath = sb.toString();
-        sb.append("/catch");
-        path_catch = sb.toString();
-        sb.setLength(0);
-        sb.append(ownPath);
-        sb.append("/img");
-        path_img = sb.toString();
-        sb.setLength(0);
-        sb.append(ownPath);
-        sb.append("/img/catch");
-        path_img_catch = sb.toString();
-        sb.setLength(0);
-        sb.append(ownPath);
-        sb.append("/download");
-        path_download = sb.toString();
-        sb.setLength(0);
-        sb.append(ownPath);
-        sb.append("/log");
-        path_Log = sb.toString();
-    }
-
-    public KFZSApp() {
-        super();
-        application = this;
-    }
-
-    public Map<String, PackageInfo> loadPackagesInfoRealTime() {
-        return ApkUtils.getInstalledApks(this);
-    }
-
-
-    @Override
-    public void onTerminate() {
-        super.onTerminate();
-        Log.d(TAG, "onTerminate");
-    }
-
-}

+ 0 - 87
app/src/main/java/com/kfzs/duanduan/adp/AdpCommonRecy.java

@@ -1,87 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.content.Context;
-import android.support.v7.widget.RecyclerView;
-import android.view.ViewGroup;
-
-import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
-import com.sheep.gamegroup.util.ListUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  AdpCommonRecy</p>
- * @ <p>Description:</p>
- * @ date:  2017/6/15 11:36
- * @ QQ:    315096953
- */
-
-public abstract class AdpCommonRecy<T> extends RecyclerView.Adapter<ViewHolder> {
-    protected Context mContext;
-    protected List<T> mListDatas = new ArrayList<>();
-
-    public AdpCommonRecy(Context context) {
-        mContext = context;
-    }
-
-    public Context getmContext() {
-        return mContext;
-    }
-
-    public List<T> getmListDatas() {
-        return mListDatas;
-    }
-
-    public void addAll(List<T> mListDatas) {
-        this.mListDatas.addAll(mListDatas);
-    }
-
-    public void add(T t) {
-        this.mListDatas.add(t);
-    }
-
-    public void add(T t, int position) {
-        ListUtil.set(this.mListDatas, t, position);
-    }
-
-    public void clear() {
-        this.mListDatas.clear();
-    }
-
-    public abstract int getViewIdByType(int viewType);
-
-    @Override
-    public ViewHolder onCreateViewHolder(final ViewGroup parent, int viewType) {
-        ViewHolder viewHolder = ViewHolder.get(mContext, null, parent,
-                getViewIdByType(viewType), -1);
-        return viewHolder;
-    }
-
-    @Override
-    public void onBindViewHolder(ViewHolder holder, int position) {
-        holder.updatePosition(position);
-        convert(holder, mListDatas.get(position));
-    }
-
-    @Override
-    public void onBindViewHolder(ViewHolder holder, int position, List<Object> payloads) {
-        if (payloads.isEmpty()) {
-            onBindViewHolder(holder, position);
-        } else {
-            holder.updatePosition(position);
-            convert(holder, mListDatas.get(position));
-        }
-    }
-
-
-
-    public abstract void convert(ViewHolder holder, T t);
-
-    @Override
-    public int getItemCount() {
-        return mListDatas.size();
-    }
-
-}

+ 0 - 216
app/src/main/java/com/kfzs/duanduan/adp/AdpFragmentRank.java

@@ -1,216 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.content.Context;
-import android.support.v7.widget.RecyclerView;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.RatingBar;
-
-import com.bumptech.glide.Glide;
-import com.kfzs.duanduan.utils.DiscountUtils;
-import com.kfzs.duanduan.view.KFProgressButton;
-import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
-import com.sheep.jiuyan.samllsheep.R;
-import com.kfzs.duanduan.utils.InstallButtonUtils;
-import com.kfzs.duanduan.bean.RecyleObj;
-import com.kfzs.duanduan.bean.RecyleType;
-import com.kfzs.duanduan.proto.GameOuterClass;
-import com.kfzs.duanduan.utils.NumberFormatUtils;
-import com.kfzs.duanduan.utils.dlg.DownBtnUtils;
-import com.kfzs.duanduan.utils.dlg.SkipUtils;
-import com.kfzs.duanduan.view.FilterWindow;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  AdpFragmentRank</p>
- * @ <p>Description: 首页排行页面的Recycle适配器</p>
- * @ date:  2017/7/12 14:30
- * @ QQ:    315096953
- */
-
-public class AdpFragmentRank extends AdpCommonRecy<RecyleObj> {
-
-
-    private final String TAG = this.getClass().getName();
-    private final int TAG_ID = R.id.btn_list_item_game_info;
-    private Map<String, InstallButtonUtils> mDownLoadItemLogicMgrMap = new HashMap<>();
-    private Context mContext;
-    private RecyclerView mRecyView;
-    private FilterWindow filterWindow;
-    private Button btnPanel;
-    private View.OnClickListener mTypeClickListener;
-
-    private int[] mIconId = {R.id.game_rank_top3_icon1, R.id.game_rank_top3_icon2, R.id.game_rank_top3_icon3};
-    private int[] mNameId = {R.id.game_rank_top3_name1, R.id.game_rank_top3_name2, R.id.game_rank_top3_name3};
-    private int[] mBtnId = {R.id.game_rank_top3_install1, R.id.game_rank_top3_install2, R.id.game_rank_top3_install3};
-    private int[] mLayoutId = {R.id.game_rank_top3_content1, R.id.game_rank_top3_content2, R.id.game_rank_top3_content3};
-    private int[] mGiftId = {R.id.img_listview_item_game_rank_top1, R.id.img_listview_item_game_rank_top2, R.id.img_listview_item_game_rank_top3};
-
-    public AdpFragmentRank(Context context, RecyclerView recyclerView, View.OnClickListener clickListener) {
-        super(context);
-        mContext = context;
-        mRecyView = recyclerView;
-        mTypeClickListener = clickListener;
-    }
-
-    @Override
-    public int getViewIdByType(int viewType) {
-        int resId = 0;
-        RecyleType recyleType = RecyleType.values()[viewType];
-        switch (recyleType) {
-            case RANK_TYPE:
-                resId = R.layout.listview_item_filter_panel;
-                break;
-            case RANK_TOP3:
-                resId = R.layout.listview_item_game_rank_top3;
-                break;
-            case RANK_LIST:
-                resId = R.layout.listview_item_game_info;
-        }
-        return resId;
-    }
-
-    /**
-     * 返回下载管理年HashMap
-     *
-     * @return
-     */
-    public Map<String, InstallButtonUtils> getmDownLoadItemLogicMgrMap() {
-        return mDownLoadItemLogicMgrMap;
-    }
-
-    /**
-     * 这一步不能少,不然会类型不匹配
-     *
-     * @param position
-     * @return
-     */
-    @Override
-    public int getItemViewType(int position) {
-        return getmListDatas().get(position).getRecyleType().ordinal();
-    }
-
-    @Override
-    public void convert(ViewHolder holder, RecyleObj recyleObj) {
-        switch (recyleObj.getRecyleType()) {
-            case RANK_TYPE:
-                bindFilterPanel(holder);
-                break;
-            case RANK_TOP3:
-                bindTop3(holder, (List<GameOuterClass.Game>) recyleObj.getDataObj());
-                break;
-            case RANK_LIST:
-                bindList(holder, (GameOuterClass.Game) recyleObj.getDataObj(), holder.getAdapterPosition());
-                break;
-        }
-    }
-
-
-    /**
-     * 绑定排行页的分类选择View
-     *
-     * @param helper
-     */
-    private void bindFilterPanel(final ViewHolder helper) {
-        btnPanel = helper.getView(R.id.btn_query_condition);
-        btnPanel.setOnClickListener(mTypeClickListener);
-    }
-
-
-    /**
-     * 绑定排行页的列表View
-     *
-     * @param helper
-     * @param model
-     */
-    private void bindList(final ViewHolder helper, GameOuterClass.Game model, int position) {
-        helper.setText(R.id.txt_list_item_game_info_title, model.getGameName());
-        helper.setText(R.id.txt_list_item_game_info_type, model.getTypeText());
-
-        helper.setText(R.id.txt_list_item_game_info_down_count,
-                String.format(mContext.getString(R.string.download_count), model.getDownloadNum() + ""));
-
-        helper.getView(R.id.ratbar_list_item_game_info, RatingBar.class)
-                .setRating(NumberFormatUtils.getDivideResult(model.getStar()));
-        DiscountUtils.getInstance().showDiscount(helper.itemView,
-                model.getIconImage(),
-                model.getDiscount());
-
-//        Glide.with(mContext)
-//                .load(model.getIconImage())
-//                .transform(new KFGlideRoundTransform(mContext, 5))
-//                .into((ImageView) helper.getView(R.id.img_list_item_game_info_logo));
-
-        if (!helper.getConvertView().hasOnClickListeners()) {
-            helper.getConvertView().setOnClickListener(clsListGoDetail);
-        }
-        helper.getConvertView().setTag(TAG_ID, model.getId());
-        DownBtnUtils.addDownloadBtnListener(helper.getView(R.id.btn_list_item_game_info, KFProgressButton.class),
-                mContext, mDownLoadItemLogicMgrMap, model, "rank_list" + position);
-    }
-
-
-    /**
-     * 点击排行 ,跳游戏详情
-     */
-    private View.OnClickListener clsListGoDetail = new View.OnClickListener() {
-        @Override
-        public void onClick(View v) {
-            SkipUtils.getInstance().goGameDetails(mContext, (int) v.getTag(TAG_ID));
-        }
-    };
-
-    /**
-     * 绑定Top3的View
-     *
-     * @param helper
-     * @param lResponseTopThreeList
-     */
-    private void bindTop3(final ViewHolder helper, final List<GameOuterClass.Game> lResponseTopThreeList) {
-        for (int i = 0; i < lResponseTopThreeList.size(); i++) {
-            final GameOuterClass.Game oTempGame = lResponseTopThreeList.get(i);
-            if (i == 0) {
-                ImageView ivChampion = helper.getView(R.id.game_rank_top3_1_bg);
-                Glide.with(mContext)
-                        .load(oTempGame.getDetailBackImage())
-                        .into(ivChampion);
-            }
-
-            helper.setText(mNameId[i], oTempGame.getGameName());
-            helper.setVisible(mGiftId[i], oTempGame.getExistGift() == 1);
-            ImageView ivGameIcon = helper.getView(mIconId[i]);
-            Glide.with(mContext)
-                    .load(oTempGame.getIconImage())
-                    .into(ivGameIcon);
-
-            String position = String.valueOf((i + 1) * 12345);
-            mDownLoadItemLogicMgrMap.put(oTempGame.getDownloadUrl(), InstallButtonUtils
-                    .init(position, oTempGame.getDownloadUrl(), oTempGame.getPackageName(), helper.getView(mBtnId[i], KFProgressButton.class),
-                            "bindTopThreePanel" + i));
-            DownBtnUtils.addDownloadBtnListener(helper.getView(mBtnId[i], KFProgressButton.class),
-                    mContext,mDownLoadItemLogicMgrMap,lResponseTopThreeList.get(i),TAG);
-            helper.getView(mLayoutId[i]).setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    SkipUtils.getInstance().goGameDetails(mContext, oTempGame.getId());
-                }
-            });
-        }
-    }
-
-    @Override
-    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
-        return super.onCreateViewHolder(parent, viewType);
-    }
-
-    @Override
-    public void onBindViewHolder(ViewHolder holder, int position) {
-        super.onBindViewHolder(holder, position);
-    }
-}

+ 0 - 545
app/src/main/java/com/kfzs/duanduan/adp/AdpMainPageRecy.java

@@ -1,545 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.app.Activity;
-import android.content.Context;
-import android.support.v4.view.ViewPager;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.StaggeredGridLayoutManager;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.ImageView;
-import android.widget.RadioGroup;
-import android.widget.RatingBar;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import com.bumptech.glide.Glide;
-import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
-import com.kfzs.duanduan.bean.CateGameBean;
-import com.kfzs.duanduan.bean.GuessYouLike;
-import com.kfzs.duanduan.bean.KFIntentKeys;
-import com.kfzs.duanduan.bean.NewGameRecommend;
-import com.kfzs.duanduan.bean.RecyleObj;
-import com.kfzs.duanduan.bean.RecyleType;
-import com.kfzs.duanduan.bean.SpecialRecommend;
-import com.kfzs.duanduan.bean.VipStyle;
-import com.kfzs.duanduan.proto.IndexBannerOuterClass;
-import com.kfzs.duanduan.utils.DiscountUtils;
-import com.kfzs.duanduan.utils.InstallButtonUtils;
-import com.kfzs.duanduan.utils.NumberFormatUtils;
-import com.kfzs.duanduan.utils.dlg.DownBtnUtils;
-import com.kfzs.duanduan.utils.dlg.SkipUtils;
-import com.kfzs.duanduan.view.ImageGlarry;
-import com.kfzs.duanduan.view.KFProgressButton;
-import com.sheep.gamegroup.util.UMConfigUtils;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  AdpMainPageRecy</p>
- * @ <p>Description: 这是首页推荐栏的RecyleView适配器</p>
- * @ date:  2017/6/15 13:03
- * @ QQ:    315096953
- */
-
-public class AdpMainPageRecy extends AdpCommonRecy<RecyleObj> {
-
-    private final String TAG = this.getClass().getName();
-    private Map<String, InstallButtonUtils> mDownLoadItemLogicMgrMap = new HashMap<>();
-    //设置Tag,因为默认Tag用于HoldView了 ,所以加个TagKey,ID必须为任意ResId
-    private final static int TAG_ID_TEMP = R.id.view_tag_1;
-    private final static int TAG_ID_TEMP2 = R.id.view_tag_2;
-    private RecyclerView mRecyView;//返回顶层的监听
-    private final static String HTML_FORMAT = "<b><font color='#E4B441'>限时福利 </font>%s会员专享</b>";
-    private ImageGlarry mImageGlarry;
-
-    public AdpMainPageRecy(Context context, RecyclerView recyclerView) {
-        super(context);
-        mContext = context;
-        mRecyView = recyclerView;
-    }
-
-
-    /**
-     * @param viewType
-     * @return 失败返回0
-     */
-    @Override
-    public int getViewIdByType(int viewType) {
-        int resId = R.layout.empty;
-        RecyleType recyleType = RecyleType.values()[viewType];
-        switch (recyleType) {
-            case BANNER:
-                resId = R.layout.fgt_main_banner;
-                break;
-            case OWN_ZONE:
-                resId = R.layout.fgt_main_own_zone;
-                break;
-            case GUESS_YOU_LIKE:
-                resId = R.layout.fgt_main_guess_you_like;
-                break;
-            case NEW_FIRST:
-                resId = R.layout.fgt_main_newrealse;
-                break;
-            case NEW_GAME_RECOMMEND:
-                resId = R.layout.fgt_main_new_game_invite;
-                break;
-            case SPECIAL_GAME_RECOMMEND:
-                resId = R.layout.fgt_main_special_game_invite;
-                break;
-            case RPG:
-            case CARTON:
-                resId = R.layout.mainpage_game_list;
-                break;
-            case SUBJECT:
-                resId = R.layout.subject_list;
-                break;
-            case NEW_GAME:
-                resId = R.layout.fgt_main_newgame;
-                break;
-            case CHOICES_GAME:
-                resId = R.layout.fgt_main_choosegames;
-                break;
-            case DEFINE_GAME:
-                resId = R.layout.fgt_main_define;
-                break;
-            case BACK_TOP:
-                resId = R.layout.listview_item_load_over;
-                break;
-        }
-        return resId;
-    }
-
-    @Override
-    public int getItemViewType(int position) {
-        return getmListDatas().get(position).getRecyleType().ordinal();
-    }
-
-    public Map<String, InstallButtonUtils> getmDownLoadItemLogicMgrMap() {
-        return mDownLoadItemLogicMgrMap;
-    }
-
-    @Override
-    public void convert(ViewHolder holder, RecyleObj recyleObj) {
-        if (recyleObj.getLoaded()) {//性能优化处理
-            return;
-        }
-        switch (recyleObj.getRecyleType()) {
-            case BANNER:
-                bindBanner(holder, (List<IndexBannerOuterClass.IndexBanner>) recyleObj.getDataObj());
-                break;
-            case OWN_ZONE:
-                bindOwnZone(holder);
-                break;
-            case NEW_GAME_RECOMMEND:
-                bindNewGameRecommend(holder, (List<NewGameRecommend>) recyleObj.getDataObj());
-                break;
-            case SPECIAL_GAME_RECOMMEND:
-                bindSpecialGameRecommend(holder, (SpecialRecommend) recyleObj.getDataObj());
-                break;
-            case RPG:
-            case CARTON:
-                CateGameBean cateGameBean = (CateGameBean) recyleObj.getDataObj();
-                bindCarTonAndRPG(holder, cateGameBean, cateGameBean.getType_name());
-                break;
-            case SUBJECT:
-                bindSubject(holder, (CateGameBean) recyleObj.getDataObj());
-                break;
-            case GUESS_YOU_LIKE:
-                bindGuessYouLike(holder, (GuessYouLike) recyleObj.getDataObj());
-                break;
-            case BACK_TOP:
-                TextView textView = holder.getView(R.id.txt_back_top);
-                if (!textView.hasOnClickListeners()) {//性能优化
-                    textView.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View v) {
-                            mRecyView.scrollToPosition(0);
-                        }
-                    });
-                }
-                break;
-        }
-        recyleObj.setLoaded(true);
-    }
-
-    /**
-     * 绑定猜你喜欢
-     *
-     * @param holder
-     */
-    private void bindGuessYouLike(ViewHolder holder, final GuessYouLike guessYouLike) {
-        if (guessYouLike == null) {
-            return;
-        }
-        RecyclerView recyclerView = holder.getView(R.id.recy_fgt_main_guess_you_like);
-        Glide.with(mContext).load(guessYouLike.getImg())
-                .into(holder.getView(R.id.img_fgt_main_guess_you_like, ImageView.class));
-        holder.getView(R.id.img_fgt_main_guess_you_like)
-                .setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        SkipUtils.getInstance().goGameType(mContext, guessYouLike.getGametypeid());
-                    }
-                });
-        recyclerView.setHasFixedSize(true);
-        recyclerView.setLayoutManager(new StaggeredGridLayoutManager(3,
-                StaggeredGridLayoutManager.HORIZONTAL));
-        recyclerView.setAdapter(new RecyclerView.Adapter() {
-            @Override
-            public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
-                RelativeLayout itemView = (RelativeLayout) LayoutInflater.from(mContext)
-                        .inflate(R.layout.item_fgt_main_game_list, parent, false);
-                itemView.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        SkipUtils.getInstance().goGameDetails(mContext, (int) v.getTag(TAG_ID_TEMP));
-                    }
-                });
-                ViewGroup.LayoutParams layoutParams = new RadioGroup.LayoutParams((int) (G.WIDTH * 0.92),
-                        ViewGroup.LayoutParams.WRAP_CONTENT);
-                itemView.setLayoutParams(layoutParams);
-
-                RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(itemView) {
-                };
-                return viewHolder;
-            }
-
-            @Override
-            public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
-                holder.itemView.setTag(TAG_ID_TEMP, guessYouLike.getGames().get(position).getId());
-
-                DiscountUtils.getInstance().showDiscount(holder.itemView,
-                        guessYouLike.getGames().get(position).getIconImage(),
-                        guessYouLike.getGames().get(position).getDiscount());
-
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_main_game_list_title)
-                ).setText(guessYouLike.getGames().get(position).getGameName());
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_main_game_list_type)
-                ).setText(guessYouLike.getGames().get(position).getTypeText());
-
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_fgt_main_game_list_down)
-                ).setText("(" + guessYouLike.getGames().get(position).getDownloadNum() + ")");
-
-                ((RatingBar) holder.itemView.findViewById(R.id.ratb_item_fgt_main_game_list)
-                ).setRating(NumberFormatUtils.getDivideResult(guessYouLike.getGames().get(position).getStar()));
-                holder.itemView.findViewById(R.id.line_item_fgt_main_game_list)
-                        .setVisibility(position % 3 == 2 ? View.GONE : View.VISIBLE);
-                DownBtnUtils.addDownloadBtnListener((KFProgressButton) holder.itemView.findViewById(R.id.btn_item_fgt_main_game_list),
-                        mContext, mDownLoadItemLogicMgrMap, guessYouLike.getGames().get(position).getGameV1(),
-                        "guess_you_like" + position);
-            }
-
-            @Override
-            public int getItemCount() {
-                return guessYouLike.getGames().size();
-            }
-
-
-        });
-    }
-
-
-    /**
-     * 绑定专题
-     *
-     * @param holder
-     * @param gameBean
-     */
-    private void bindSubject(ViewHolder holder, final CateGameBean gameBean) {
-        if (gameBean == null) {
-            return;
-        }
-        RecyclerView recyclerView = holder.getView(R.id.recy_subject_list);
-        Glide.with(mContext).load(gameBean.getImg())
-                .into(holder.getView(R.id.img_subject_list, ImageView.class));
-        holder.getView(R.id.img_subject_list)
-                .setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        SkipUtils.getInstance().goGameType(mContext, gameBean.getGametypeid());
-                    }
-                });
-        recyclerView.setHasFixedSize(true);
-        recyclerView.setLayoutManager(new StaggeredGridLayoutManager(3,
-                StaggeredGridLayoutManager.HORIZONTAL));
-        recyclerView.setAdapter(new RecyclerView.Adapter() {
-            @Override
-            public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
-                View itemView = LayoutInflater.from(mContext)
-                        .inflate(R.layout.item_fgt_main_game_list, parent, false);
-                itemView.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        SkipUtils.getInstance().goGameDetails(mContext, (int) v.getTag(TAG_ID_TEMP));
-                    }
-                });
-                ViewGroup.LayoutParams layoutParams = new RadioGroup.LayoutParams((int) (G.WIDTH * 0.92),
-                        ViewGroup.LayoutParams.WRAP_CONTENT);
-                itemView.setLayoutParams(layoutParams);
-                RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(itemView) {
-                };
-                return viewHolder;
-            }
-
-            @Override
-            public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
-                holder.itemView.setTag(TAG_ID_TEMP, gameBean.getGames().get(position).getId());
-
-                DiscountUtils.getInstance().showDiscount(holder.itemView,
-                        gameBean.getGames().get(position).getIconImage(),
-                        gameBean.getGames().get(position).getDiscount());
-
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_main_game_list_title)
-                ).setText(gameBean.getGames().get(position).getGameName());
-
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_main_game_list_type)
-                ).setText(gameBean.getGames().get(position).getTypeText());
-
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_fgt_main_game_list_down)
-                ).setText("(" + gameBean.getGames().get(position).getDownloadNum() + ")");
-
-                holder.itemView.findViewById(R.id.line_item_fgt_main_game_list)
-                        .setVisibility(position % 3 == 2 ? View.GONE : View.VISIBLE);
-
-                ((RatingBar) holder.itemView.findViewById(R.id.ratb_item_fgt_main_game_list)
-                ).setRating(NumberFormatUtils.getDivideResult(gameBean.getGames().get(position).getStar()));
-                DownBtnUtils.addDownloadBtnListener((KFProgressButton) holder.itemView.findViewById(R.id.btn_item_fgt_main_game_list),
-                        mContext, mDownLoadItemLogicMgrMap, gameBean.getGames().get(position).getGameV1(), "subject_" + position);
-            }
-
-            @Override
-            public int getItemCount() {
-                return gameBean.getGames().size();
-            }
-
-        });
-    }
-
-    /**
-     * 绑定卡通一栏
-     *
-     * @param holder
-     * @param gameBean
-     * @param typename 这里以后改为int或枚举吧,很可能会动增的
-     */
-    private void bindCarTonAndRPG(ViewHolder holder, final CateGameBean gameBean, String typename) {
-        if (gameBean == null) {
-            return;
-        }
-        RecyclerView recyclerView = holder.getView(R.id.recy_mainpage_game_list, RecyclerView.class);
-        holder.getView(R.id.txt_mainpage_game_list, TextView.class)
-                .setText(typename);
-        holder.getView(R.id.txt_mainpage_game_list_more)
-                .setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        SkipUtils.getInstance().goGameType(mContext, gameBean.getGametypeid());
-                    }
-                });
-//        Glide.with(mContext).load(VipStyle.getInstance().getMore())
-//                .into(holder.getView(R.id.txt_mainpage_game_list_more, ImageView.class));
-        recyclerView.setHasFixedSize(true);
-        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
-        recyclerView.setAdapter(new RecyclerView.Adapter() {
-            @Override
-            public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
-                View itemView = LayoutInflater.from(mContext)
-                        .inflate(R.layout.item_fgt_main_game_list, parent, false);
-                itemView.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        SkipUtils.getInstance().goGameDetails(mContext, (int) v.getTag(TAG_ID_TEMP));
-                    }
-                });
-                RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(itemView) {
-                };
-                return viewHolder;
-            }
-
-            @Override
-            public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
-                holder.itemView.setTag(TAG_ID_TEMP, gameBean.getGames().get(position).getId());
-
-                DiscountUtils.getInstance().showDiscount(holder.itemView,
-                        gameBean.getGames().get(position).getIconImage(),
-                        gameBean.getGames().get(position).getDiscount());
-
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_main_game_list_title)
-                ).setText(gameBean.getGames().get(position).getGameName());
-
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_main_game_list_type)
-                ).setText(gameBean.getGames().get(position).getTypeText());
-
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_fgt_main_game_list_down)
-                ).setText("(" + gameBean.getGames().get(position).getDownloadNum() + ")");
-
-                holder.itemView.findViewById(R.id.line_item_fgt_main_game_list)
-                        .setVisibility(position == getItemCount() - 1 ? View.GONE : View.VISIBLE);
-                ((RatingBar) holder.itemView.findViewById(R.id.ratb_item_fgt_main_game_list)
-                ).setRating(NumberFormatUtils.getDivideResult(gameBean.getGames().get(position).getStar()));
-                DownBtnUtils.addDownloadBtnListener((KFProgressButton) holder.itemView.findViewById(R.id.btn_item_fgt_main_game_list),
-                        mContext, mDownLoadItemLogicMgrMap, gameBean.getGames().get(position).getGameV1(), "carton_" + position);
-            }
-
-            @Override
-            public int getItemCount() {
-                return gameBean.getGames().size();
-            }
-        });
-    }
-
-
-    /**
-     * 绑定特别推荐栏
-     *
-     * @param holder
-     */
-    private void bindSpecialGameRecommend(ViewHolder holder, final SpecialRecommend specialRecommend) {
-        if (specialRecommend == null) {
-            return;
-        }
-        Glide.with(mContext).load(specialRecommend.getImg())
-                .into(holder.getView(R.id.img_main_special_recommend_banner, ImageView.class));
-        DiscountUtils.getInstance().showDiscount(holder.itemView,
-                specialRecommend.getGame().getIconImage(),
-                specialRecommend.getGame().getDiscount());
-
-        holder.getView(R.id.txt_main_special_recommend_main_title, TextView.class)
-                .setText(specialRecommend.getName());
-        holder.getView(R.id.txt_main_special_recommend_title, TextView.class)
-                .setText(specialRecommend.getGame().getGameName());
-        holder.getView(R.id.txt_main_special_recommend_type, TextView.class)
-                .setText(specialRecommend.getGame().getSize());
-        holder.getView(R.id.lay_fgt_main_special_recommend)
-                .setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        SkipUtils.getInstance().goGameDetails(mContext, specialRecommend.getGame().getId());
-                    }
-                });
-        holder.getView(R.id.img_main_special_recommend_banner)
-                .setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        SkipUtils.getInstance().goGameDetails(mContext, specialRecommend.getGame().getId());
-                    }
-                });
-        DownBtnUtils.addDownloadBtnListener(holder.getView(R.id.btn_fgt_main_special_recommend, KFProgressButton.class),
-                mContext, mDownLoadItemLogicMgrMap, specialRecommend.getGame().getGameV1(), "specail_recommend");
-    }
-
-    /**
-     * 新游推荐
-     *
-     * @param holder
-     */
-    private void bindNewGameRecommend(ViewHolder holder, final List<NewGameRecommend> recommendList) {
-        if (recommendList == null || recommendList.size() < 1) {
-            return;
-        }
-        RecyclerView recyclerView = holder.getView(R.id.recy_fgt_main_new_game_invite);
-        recyclerView.setHasFixedSize(true);
-        recyclerView.setLayoutManager(new StaggeredGridLayoutManager(1,
-                StaggeredGridLayoutManager.HORIZONTAL));
-        recyclerView.setAdapter(new RecyclerView.Adapter() {
-            @Override
-            public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
-                View itemView = LayoutInflater.from(mContext)
-                        .inflate(R.layout.item_fgt_main_new_game_invite, parent, false);
-                itemView.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        SkipUtils.getInstance().goGameDetails(mContext, (int) v.getTag(TAG_ID_TEMP));
-                    }
-                });
-                RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(itemView) {
-                };
-                return viewHolder;
-            }
-
-            @Override
-            public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
-                holder.itemView.setTag(TAG_ID_TEMP, recommendList.get(position).getGameid());
-                ((TextView) holder.itemView.findViewById(R.id.txt_item_fgt_main_new_game_invite)
-                ).setText(recommendList.get(position).getGamename());
-
-                DiscountUtils.getInstance().showDiscount(holder.itemView,
-                        recommendList.get(position).getIcon(), recommendList.get(position).getDiscount());
-            }
-
-            @Override
-            public int getItemCount() {
-                return recommendList.size();
-            }
-        });
-    }
-
-    /**
-     * 绑定专区
-     *
-     * @param holder
-     */
-    private void bindOwnZone(ViewHolder holder) {
-        Glide.with(mContext).load(VipStyle.getInstance().getIndexbanner())
-                .into(holder.getView(R.id.img_fgt_main_own_zone, ImageView.class));
-        holder.itemView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                G.showToast(R.string.coming_soon);
-            }
-        });
-    }
-
-
-    /**
-     * 绑定Banner的操作过程
-     *
-     * @param holder
-     * @param topBannerList
-     */
-    private void bindBanner(ViewHolder holder, final List<IndexBannerOuterClass.IndexBanner> topBannerList) {
-        ViewPager viewPager = holder.getView(R.id.viewpager_fgt_main_banner);
-        RadioGroup radioGroup = holder.getView(R.id.group_fgt_main_banner);
-        ArrayList<String> imgURL = new ArrayList<>();
-        for (IndexBannerOuterClass.IndexBanner indexBanner : topBannerList) {
-            imgURL.add(indexBanner.getImageUrl());
-        }
-        if (mImageGlarry != null) {
-            mImageGlarry.init(imgURL.toArray(new String[]{}), ImageView.ScaleType.CENTER_CROP);
-            return;
-        }
-        mImageGlarry = new ImageGlarry((Activity) mContext, viewPager, radioGroup);
-        mImageGlarry.init(imgURL.toArray(new String[]{}), ImageView.ScaleType.CENTER_CROP);
-        mImageGlarry.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                IndexBannerOuterClass.IndexBanner clickedGameObj = topBannerList.get(position);
-                Map<String, String> map = new HashMap<>();
-                map.put("BANNER_TYPE", clickedGameObj.getType() == KFIntentKeys.BANNER_TYPE_GAME ? "游戏Banner" : "广告Banner");
-                //TODO 小刁,这些事件分析以后要专门弄个静态类来统一管理
-                UMConfigUtils.Event.BANNER_CLICK_HORIZONTAL.onEvent(map);
-                switch (clickedGameObj.getType()) {
-                    case KFIntentKeys.BANNER_TYPE_GAME:
-                        SkipUtils.getInstance().goGameDetails(mContext, clickedGameObj.getGameId());
-                        break;
-                    case KFIntentKeys.BANNER_TYPE_AD:
-                        SkipUtils.getInstance().goWebView(mContext, clickedGameObj.getHtmlUrl(),
-                                clickedGameObj.getTitle(), mContext.getPackageName(), clickedGameObj.getGameId());
-                        break;
-                }
-            }
-        });
-    }
-
-
-}

+ 0 - 140
app/src/main/java/com/kfzs/duanduan/adp/AdpSearchGame.java

@@ -1,140 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.content.Context;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.RatingBar;
-import android.widget.TextView;
-
-import com.kfzs.duanduan.proto.GameOuterClass;
-import com.kfzs.duanduan.utils.DiscountUtils;
-import com.kfzs.duanduan.utils.NumberFormatUtils;
-import com.kfzs.duanduan.utils.dlg.DownBtnUtils;
-import com.kfzs.duanduan.utils.dlg.SkipUtils;
-import com.kfzs.duanduan.utils.dlg.ViewFindUtils;
-import com.kfzs.duanduan.view.KFProgressButton;
-import com.sheep.jiuyan.samllsheep.R;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  AdpSearchGame</p>
- * @ <p>Description:</p>
- * @ date:  2017/6/22 16:14
- * @ QQ:    315096953
- */
-
-public class AdpSearchGame extends BaseAdpterWithDownBtn {
-
-    private List<GameOuterClass.Game> mList = new ArrayList<>();
-
-    public AdpSearchGame(Context context) {
-        this.mContext = context;
-    }
-
-    public void addAll(List<GameOuterClass.Game> list) {
-        mList.addAll(list);
-    }
-
-    public void clear() {
-        mList.clear();
-    }
-
-    @Override
-    public int getCount() {
-        return mList.size();
-    }
-
-    @Override
-    public GameOuterClass.Game getItem(int position) {
-        return mList.get(position);
-    }
-
-    @Override
-    public long getItemId(int position) {
-        return 0;
-    }
-
-    @Override
-    public View getView(final int position, View convertView, ViewGroup parent) {
-        if (convertView == null) {
-            convertView = View.inflate(mContext, R.layout.listview_item_game_info, null);
-            convertView.setOnClickListener(cls_GoDetail);
-        }
-        DiscountUtils.getInstance().showDiscount(convertView,
-                getItem(position).getIconImage(),
-                getItem(position).getDiscount());
-
-//        Glide.with(mContext).load(getItem(position).getIconImage())
-//                .into(ViewFindUtils.find(convertView, R.id.img_logo, ImageView.class));
-
-        ViewFindUtils.find(convertView, R.id.img_listview_item_game_info)
-                .setVisibility(getItem(position).getExistGift() == 1 ? View.VISIBLE : View.GONE);
-        ViewFindUtils.find(convertView, R.id.txt_list_item_game_info_title, TextView.class)
-                .setText(getItem(position).getGameName());
-        ViewFindUtils.find(convertView, R.id.txt_list_item_game_info_type, TextView.class)
-                .setText(getItem(position).getTypeText());
-
-        String downloadCnt = String.format(mContext.getString(R.string.download_count),
-                getItem(position).getDownloadNum() + "");
-        ViewFindUtils.find(convertView, R.id.txt_list_item_game_info_down_count, TextView.class)
-                .setText(downloadCnt + "");
-        ViewFindUtils.find(convertView, R.id.ratbar_list_item_game_info, RatingBar.class)
-                .setRating(NumberFormatUtils.getDivideResult(getItem(position).getStar()));
-
-        //更新跳转位置
-        convertView.setTag(TAG_ID, getItem(position).getId());
-
-        //下载按钮的功能处理
-        KFProgressButton btn = ViewFindUtils.hold(convertView, R.id.btn_list_item_game_info);
-        if (getItem(position).getIsInBook() == 1) {
-            if (getItem(position).getIsCanPreDown()) {
-                btn.setText(mContext.getString(R.string.predown));
-                btn.setOnClickListener(null);
-                DownBtnUtils.addDownloadBtnListener(btn, mContext,
-                        getmInstallButtonMgrMap(), getItem(position),
-                        "search_game" + position);
-            } else {
-                btn.setText(mContext.getString(R.string.tab_game_order));
-                btn.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        goBookedGame(getItem(position));
-                    }
-                });
-            }
-        } else {
-            btn.setText(mContext.getString(R.string.install));
-            btn.setOnClickListener(null);
-            DownBtnUtils.addDownloadBtnListener(btn, mContext,
-                    getmInstallButtonMgrMap(), getItem(position),
-                    "search_game" + position);
-        }
-        return convertView;
-    }
-
-
-    /**
-     * 跳到预约游戏
-     *
-     * @param game
-     */
-    private void goBookedGame(GameOuterClass.Game game) {
-        SkipUtils.getInstance().goGameDetails(mContext, game.getId());
-//        Intent intent = new Intent(mContext, ActWeb.class);
-//
-//        intent.putExtra(KFIntentKeys.EXTRA_BEHAIOR, ActWeb.BEHAVIOR_GAME_BOOK);
-//        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_SHARE_IMGURL, game.getIconImage());
-//        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_GAME_BOOK_ID, String.valueOf(game.getBookId()));
-//        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_GAME_ID, String.valueOf(game.getId()));
-//        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_PACKAGENAME, game.getPackageName());
-//        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_GAME_VERSION, game.getVersion());
-//        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_GAME_SIZE, game.getSize());
-//
-//        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_URL, game.getUrl());
-//        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_TITLE, game.getGameName());
-//        mContext.startActivity(intent);
-    }
-}

+ 0 - 119
app/src/main/java/com/kfzs/duanduan/adp/AdpSearchRecord.java

@@ -1,119 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.content.Context;
-import android.text.TextUtils;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.BaseAdapter;
-import android.widget.TextView;
-
-import com.sheep.jiuyan.samllsheep.R;
-import com.kfzs.duanduan.bean.SearchRecordBean;
-import com.kfzs.duanduan.db.SearchRecordHelper;
-import com.kfzs.duanduan.utils.dlg.ViewFindUtils;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  AdpSearchRecord</p>
- * @ <p>Description:搜索页的搜索历史列表Adp</p>
- * @ date:  2017/8/19 10:14
- * @ QQ:    315096953
- */
-
-public class AdpSearchRecord extends BaseAdapter {
-
-    private Context mContext;
-    private List<SearchRecordBean> mList;
-    /**
-     * 这里是点击list列表后的监听
-     */
-    private AdapterView.OnItemClickListener mOnItemClickListener;
-    private final int TAG_ID = R.id.search_tagflow_layout;
-
-    /**
-     * @param context
-     * @param onItemClickListener 其中只有position有效,是点击时间的反馈
-     */
-    public AdpSearchRecord(Context context, AdapterView.OnItemClickListener onItemClickListener) {
-        mContext = context;
-        mList = new ArrayList<>();
-        mList = SearchRecordHelper.getInstance().getRecordList();
-        mOnItemClickListener = onItemClickListener;
-    }
-
-    public void clear() {
-        mList.clear();
-        SearchRecordHelper.getInstance().clearList();
-    }
-
-    public void add(String key) {
-        if (TextUtils.isEmpty(key)) {
-            return;
-        }
-        SearchRecordBean searchRecordBean = new SearchRecordBean();
-        searchRecordBean.setKey(key.trim());
-        searchRecordBean.setDate(new Date());
-        mList = SearchRecordHelper.getInstance().addRecordList(searchRecordBean);
-        notifyDataSetInvalidated();
-    }
-
-    @Override
-    public int getCount() {
-        return mList.size();
-    }
-
-    @Override
-    public SearchRecordBean getItem(int position) {
-        return mList.get(position);
-    }
-
-    @Override
-    public long getItemId(int position) {
-        return 0;
-    }
-
-    @Override
-    public View getView(int position, View convertView, ViewGroup parent) {
-        if (convertView == null) {
-            convertView = View.inflate(mContext, R.layout.listview_item_search_history, null);
-            ViewFindUtils.hold(convertView, R.id.ibtn_listview_item_search_history_delete)
-                    .setOnClickListener(clsDelete);
-            convertView.setOnClickListener(clsSelect);
-        }
-        ViewFindUtils.hold(convertView, R.id.txt_listview_item_search_history_name, TextView.class)
-                .setText(getItem(position).getKey());
-        ViewFindUtils.hold(convertView, R.id.ibtn_listview_item_search_history_delete)
-                .setTag(TAG_ID, position);
-        convertView.setTag(TAG_ID, position);
-        return convertView;
-    }
-
-
-    /**
-     * 删除历史记录
-     */
-    private View.OnClickListener clsDelete = new View.OnClickListener() {
-        @Override
-        public void onClick(View v) {
-            SearchRecordHelper.getInstance().deleteSameRecord(mList.get((int) v.getTag(TAG_ID)), mList);
-            notifyDataSetChanged();
-        }
-    };
-
-    /**
-     * 删除信息的回调
-     */
-    private View.OnClickListener clsSelect = new View.OnClickListener() {
-        @Override
-        public void onClick(View v) {
-            mOnItemClickListener.onItemClick(null, v, (int) v.getTag(TAG_ID), 0);
-        }
-    };
-
-
-}

+ 0 - 67
app/src/main/java/com/kfzs/duanduan/adp/AdpSearchViewPager.java

@@ -1,67 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.content.Context;
-import android.support.annotation.StringRes;
-import android.support.v4.view.PagerAdapter;
-import android.view.View;
-import android.view.ViewGroup;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  AdpSearchViewPager</p>
- * @ <p>Description:</p>
- * @ date:  2017/6/22 16:17
- * @ QQ:    315096953
- */
-
-public class AdpSearchViewPager extends PagerAdapter {
-
-    private Context mContext;
-
-    private List<Integer> mListTitles = new ArrayList<>();
-    private List<View> mListItem = new ArrayList<>();
-
-    public AdpSearchViewPager(Context context) {
-        this.mContext = context;
-    }
-
-    public void addView(View view, @StringRes int resId) {
-        mListItem.add(view);
-        mListTitles.add(resId);
-    }
-
-
-    @Override
-    public Object instantiateItem(ViewGroup container, int position) {
-        container.addView(mListItem.get(position));
-        return mListItem.get(position);
-    }
-
-    @Override
-    public void destroyItem(ViewGroup container, int position, Object object) {
-        container.removeView(mListItem.get(position));
-    }
-
-    @Override
-    public int getItemPosition(Object object) {
-        return super.getItemPosition(object);
-    }
-
-    @Override
-    public CharSequence getPageTitle(int position) {
-        return mContext.getString(mListTitles.get(position));
-    }
-
-    @Override
-    public int getCount() {
-        return mListTitles.size();
-    }
-
-    @Override
-    public boolean isViewFromObject(View view, Object object) {
-        return view.equals(object);
-    }
-}

+ 0 - 50
app/src/main/java/com/kfzs/duanduan/adp/AdpViewPagerDetail.java

@@ -1,50 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentPagerAdapter;
-
-import com.kfzs.duanduan.bean.VipStyle;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  AdpViewPagerMainPage</p>
- * @ <p>Description: 首页的ViewPager监听</p>
- * @ date:  2017/6/14 13:21
- * @ QQ:    315096953
- */
-
-public class AdpViewPagerDetail extends FragmentPagerAdapter {
-
-    private List<String> mTitles = new ArrayList<>();
-    private List<Fragment> mListFragment = new ArrayList<>();
-
-    public AdpViewPagerDetail(FragmentManager fm) {
-        super(fm);
-    }
-
-    public void add(Fragment fragment, String title) {
-        mListFragment.add(fragment);
-        mTitles.add(title);
-    }
-
-    @Override
-    public CharSequence getPageTitle(int position) {
-        return position == 1 ? VipStyle.getInstance().getViptypename() + mTitles.get(position) : mTitles.get(position);
-    }
-
-    @Override
-    public Fragment getItem(int position) {
-        return mListFragment.get(position);
-    }
-
-    @Override
-    public int getCount() {
-        return mListFragment.size();
-    }
-
-
-}

+ 0 - 69
app/src/main/java/com/kfzs/duanduan/adp/BaseAdpterWithDownBtn.java

@@ -1,69 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.content.Context;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-
-import com.sheep.jiuyan.samllsheep.R;
-import com.kfzs.duanduan.utils.InstallButtonUtils;
-import com.kfzs.duanduan.utils.dlg.SkipUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  BaseAdpterWithDownBtn</p>
- * @ <p>Description:搜索页有下载按钮的BaseAdapter统一处理</p>
- * @ date:  2017/8/3 18:19
- * @ QQ:    315096953
- */
-
-public class BaseAdpterWithDownBtn extends BaseAdapter {
-
-    private Map<String, InstallButtonUtils> mInstallButtonMgrMap = new HashMap<>();
-    protected Context mContext;
-
-    //养成习惯最好不要暂用默认TAG
-    protected final static int TAG_ID = R.id.view_tag_down_btn;
-
-
-    @Override
-    public int getCount() {
-        return 0;
-    }
-
-    @Override
-    public Object getItem(int position) {
-        return null;
-    }
-
-    @Override
-    public long getItemId(int position) {
-        return 0;
-    }
-
-    @Override
-    public View getView(int position, View convertView, ViewGroup parent) {
-        return null;
-    }
-
-    public Map<String, InstallButtonUtils> getmInstallButtonMgrMap() {
-        return mInstallButtonMgrMap;
-    }
-
-    public void setmInstallButtonMgrMap(Map<String, InstallButtonUtils> mInstallButtonMgrMap) {
-        this.mInstallButtonMgrMap = mInstallButtonMgrMap;
-    }
-
-    /**
-     * 跳详情页的统一监听
-     */
-    protected View.OnClickListener cls_GoDetail = new View.OnClickListener() {
-        @Override
-        public void onClick(View v) {
-            SkipUtils.getInstance().goGameDetails(mContext, (int) v.getTag(TAG_ID));
-        }
-    };
-}

+ 0 - 67
app/src/main/java/com/kfzs/duanduan/adp/FilterWindowAdapter.java

@@ -1,67 +0,0 @@
-package com.kfzs.duanduan.adp;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.TextView;
-
-import com.kfzs.android.view.tag.FlowLayout;
-import com.kfzs.android.view.tag.TagAdapter;
-import com.kfzs.android.view.tag.TagFlowLayout;
-import com.kfzs.appstore.utils.adapter.MDLAdpater;
-import com.kfzs.appstore.utils.adapter.MDLViewHolderHelper;
-import com.sheep.jiuyan.samllsheep.R;
-import com.kfzs.duanduan.bean.QueryCondition;
-import com.kfzs.duanduan.proto.GameTypeOuterClass;
-import com.kfzs.duanduan.view.FilterWindow;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * Created by HooRang on 2017/2/15.
- */
-public class FilterWindowAdapter extends MDLAdpater<QueryCondition> {
-
-    public static final String FLOW_LAYOUT_TAG = "FLOW_LAYOUT_TAG_";
-    private Context mContext ;
-
-    private Map<String,TagAdapter<GameTypeOuterClass.GameType>> qcItemsAdapterContainer = new HashMap<>();
-
-
-    public FilterWindowAdapter(Context context) {
-        super(context, R.layout.listview_item_query_condition);
-        this.mContext = context;
-    }
-
-
-
-    @Override
-    protected void fillData(MDLViewHolderHelper helper, int position, QueryCondition model) {
-        helper.setImageResource(R.id.query_condition_category_icon, model.getCategoryIcon());
-        String iTag = FLOW_LAYOUT_TAG  + position;
-        TagFlowLayout tagList = helper.getView(R.id.query_condition_tags);
-        tagList.setTag(iTag);
-        TagAdapter<GameTypeOuterClass.GameType> tagAdapter = new TagAdapter<GameTypeOuterClass.GameType>(model.getTags()) {
-            @Override
-            public View getView(FlowLayout parent, int position, GameTypeOuterClass.GameType o) {
-
-                TextView tv = (TextView)LayoutInflater.from(mContext).inflate(R.layout.hot_tag_item,parent,false);
-                tv.setText(o.getTypeName());
-                tv.setTag(o.getId());
-                return tv;
-            }
-        };
-
-        if (!qcItemsAdapterContainer.containsKey(iTag)){
-            qcItemsAdapterContainer.put(iTag , tagAdapter);
-        }
-
-
-        tagList.setAdapter(tagAdapter);
-        tagAdapter.setSelectedList(FilterWindow.getCheckedTagsContainer().get(position));
-    }
-
-
-}

+ 0 - 108
app/src/main/java/com/kfzs/duanduan/bean/BaseMsg.java

@@ -1,108 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  BaseMsg</p>
- * @ <p>Description:</p>
- * @ date:  2017/12/13 10:23
- * @ QQ:    315096953
- */
-
-public class BaseMsg {
-
-    private String msg;
-
-    private Integer code = 0;
-
-    private Integer total = 0;
-
-    private Object data;
-
-    public String getMsg() {
-        return msg == null ? "" : msg;
-    }
-
-    public String getMessage(String defaultmsg) {
-        return msg == null ? defaultmsg : msg;
-    }
-
-    @Override
-    public String toString() {
-        return JSONObject.toJSONString(this);
-    }
-
-
-    public void setMsg(String msg) {
-        this.msg = msg;
-    }
-
-    /**
-     * 默认为0表示有错误
-     *
-     * @return @NotNull
-     */
-    public Integer getCode() {
-        return code;
-    }
-
-    public void setCode(Integer code) {
-        this.code = code;
-    }
-
-    public Integer getTotal() {
-        return total;
-    }
-
-    public void setTotal(Integer total) {
-        this.total = total;
-    }
-
-    /**
-     * @return @NotNull
-     */
-    public Object getData() {
-        if (data == null) {
-            data = new Object();
-        }
-        return data;
-    }
-
-    /**
-     * 失败返回null
-     *
-     * @param clazz
-     * @param <T>
-     * @return
-     */
-    public <T> T getData(Class<T> clazz) {
-        if (data == null) {
-            return null;
-        }
-        return JSONObject.parseObject(JSONObject.toJSONString(data), clazz);
-    }
-
-    /**
-     * 如果data里是数组,直接这样获取
-     *
-     * @param clazz
-     * @param <T>
-     * @return
-     */
-    public <T> List<T> getDatas(Class<T> clazz) {
-        if (data == null) {
-            return null;
-        }
-        return JSONArray.parseArray(JSONObject.toJSONString(data), clazz);
-    }
-
-
-    public void setData(Object data) {
-        this.data = data;
-    }
-
-}

+ 0 - 72
app/src/main/java/com/kfzs/duanduan/bean/BorrowPlayIntegral.java

@@ -1,72 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * 借着玩 积分展示
- * Created by ljy on 2018/1/16.
- */
-
-public class BorrowPlayIntegral {
-    private String GameId ;//24;
-    private String FirstGearPay ;//3445;一档充值金额
-    private String SecondGearPay ;//423;
-    private String ThirdGearPay ;//778;
-    private String FirstGearReturn ;//2345;一档返回积分
-    private String SecondGearReturn ;//565;
-    private String ThirdGearTeturn ;//898;State //1
-
-    public String getGameId() {
-        return GameId;
-    }
-
-    public void setGameId(String gameId) {
-        GameId = gameId;
-    }
-
-    public String getFirstGearPay() {
-        return FirstGearPay;
-    }
-
-    public void setFirstGearPay(String firstGearPay) {
-        FirstGearPay = firstGearPay;
-    }
-
-    public String getSecondGearPay() {
-        return SecondGearPay;
-    }
-
-    public void setSecondGearPay(String secondGearPay) {
-        SecondGearPay = secondGearPay;
-    }
-
-    public String getThirdGearPay() {
-        return ThirdGearPay;
-    }
-
-    public void setThirdGearPay(String thirdGearPay) {
-        ThirdGearPay = thirdGearPay;
-    }
-
-    public String getFirstGearReturn() {
-        return FirstGearReturn;
-    }
-
-    public void setFirstGearReturn(String firstGearReturn) {
-        FirstGearReturn = firstGearReturn;
-    }
-
-    public String getSecondGearReturn() {
-        return SecondGearReturn;
-    }
-
-    public void setSecondGearReturn(String secondGearReturn) {
-        SecondGearReturn = secondGearReturn;
-    }
-
-    public String getThirdGearTeturn() {
-        return ThirdGearTeturn;
-    }
-
-    public void setThirdGearTeturn(String thirdGearTeturn) {
-        ThirdGearTeturn = thirdGearTeturn;
-    }
-}

+ 0 - 61
app/src/main/java/com/kfzs/duanduan/bean/CateGameBean.java

@@ -1,61 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  CateGameBean</p>
- * @ <p>Description:</p>
- * @ date:  2017/12/13 16:37
- * @ QQ:    315096953
- */
-
-public class CateGameBean {
-    private int gametypeid = 0;
-    private String type_name = "";
-    private String img = "";
-    private int type = 0;
-    private List<Game> games = new ArrayList<>();
-
-
-    public int getGametypeid() {
-        return gametypeid;
-    }
-
-    public void setGametypeid(int gametypeid) {
-        this.gametypeid = gametypeid;
-    }
-
-    public String getType_name() {
-        return type_name;
-    }
-
-    public void setType_name(String type_name) {
-        this.type_name = type_name;
-    }
-
-    public String getImg() {
-        return img;
-    }
-
-    public void setImg(String img) {
-        this.img = img;
-    }
-
-    public int getType() {
-        return type;
-    }
-
-    public void setType(int type) {
-        this.type = type;
-    }
-
-    public List<Game> getGames() {
-        return games;
-    }
-
-    public void setGames(List<Game> games) {
-        this.games = games;
-    }
-}

+ 0 - 34
app/src/main/java/com/kfzs/duanduan/bean/CateGameList.java

@@ -1,34 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  CateGameList</p>
- * @ <p>Description:</p>
- * @ date:  2017/12/13 16:25
- * @ QQ:    315096953
- */
-
-public class CateGameList {
-
-    private CateGameBean subject = new CateGameBean();
-    private List<CateGameBean> common = new ArrayList<>();
-
-    public CateGameBean getSubject() {
-        return subject;
-    }
-
-    public void setSubject(CateGameBean subject) {
-        this.subject = subject;
-    }
-
-    public List<CateGameBean> getCommon() {
-        return common;
-    }
-
-    public void setCommon(List<CateGameBean> common) {
-        this.common = common;
-    }
-}

+ 0 - 23
app/src/main/java/com/kfzs/duanduan/bean/CompareResult.java

@@ -1,23 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * Created by HooRang on 2017/2/23.
- */
-public class CompareResult {
-
-
-    /**
-     * equals
-     */
-    public static final int EQUALS = 0;
-
-    /**
-     * great that
-     */
-    public static final int GT = 1;
-
-    /**
-     * less that
-     */
-    public static final int LT = -1;
-}

+ 0 - 85
app/src/main/java/com/kfzs/duanduan/bean/ContactBean.java

@@ -1,85 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  ContactBean</p>
- * @ <p>Description:</p>
- * @ date:  2017/11/14 10:10
- * @ QQ:    315096953
- */
-
-public class ContactBean {
-
-    private String bookCreatteTime;
-    private String contactsName;
-    private String contactsPhone1;
-    private String contactsPhone2;
-    private String contactsPhone3;
-    private String contactsPhone4;
-    private String contactsPhone5;
-    private String contactsContent;
-
-    public String getBookCreatteTime() {
-        return bookCreatteTime;
-    }
-
-    public void setBookCreatteTime(String bookCreatteTime) {
-        this.bookCreatteTime = bookCreatteTime;
-    }
-
-    public String getContactsName() {
-        return contactsName;
-    }
-
-    public void setContactsName(String contactsName) {
-        this.contactsName = contactsName;
-    }
-
-    public String getContactsPhone1() {
-        return contactsPhone1;
-    }
-
-    public void setContactsPhone1(String contactsPhone1) {
-        this.contactsPhone1 = contactsPhone1;
-    }
-
-    public String getContactsPhone2() {
-        return contactsPhone2;
-    }
-
-    public void setContactsPhone2(String contactsPhone2) {
-        this.contactsPhone2 = contactsPhone2;
-    }
-
-    public String getContactsPhone3() {
-        return contactsPhone3;
-    }
-
-    public void setContactsPhone3(String contactsPhone3) {
-        this.contactsPhone3 = contactsPhone3;
-    }
-
-    public String getContactsPhone4() {
-        return contactsPhone4;
-    }
-
-    public void setContactsPhone4(String contactsPhone4) {
-        this.contactsPhone4 = contactsPhone4;
-    }
-
-    public String getContactsPhone5() {
-        return contactsPhone5;
-    }
-
-    public void setContactsPhone5(String contactsPhone5) {
-        this.contactsPhone5 = contactsPhone5;
-    }
-
-    public String getContactsContent() {
-        return contactsContent;
-    }
-
-    public void setContactsContent(String contactsContent) {
-        this.contactsContent = contactsContent;
-    }
-}

+ 0 - 312
app/src/main/java/com/kfzs/duanduan/bean/Game.java

@@ -1,312 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import com.kfzs.duanduan.proto.GameOuterClass;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  Game</p>
- * @ <p>Description:游戏基类</p>
- * @ date:  2017/12/13 13:39
- * @ QQ:    315096953
- */
-
-public class Game {
-
-    private int id = 0;
-    private String gameName = "";
-    private String iconImage = "";
-    private long startTime = 0L;
-    private String version = "";
-    private String size = "";
-    private String detailBackImage = "";
-    private String detailImage = "";
-    private String introduce = "";
-    private int isShelves = 0;
-    private int downloadNumTrue = 0;
-    private int downloadNum = 0;
-    private String downloadUrl = "";
-    private int searchNumTrue = 0;
-    private int searchNum = 0;
-    private int star = 0;
-    private String typeText = "";
-    private String packageName = "";
-    private String versionCode = "";
-    private long shelvesTime = 0L;
-    private int isInBook = 0;
-    private String onlyTag = "";
-    private int bookId = 0;
-    private String bookName = "";
-    private String url = "";
-    private boolean booked = false;
-    private boolean isCanPreDown = false;
-    private int existGift = 0;
-    private String discount;
-
-    public String getDiscount() {
-        return discount == null ? "" : discount;
-    }
-
-    public void setDiscount(String discount) {
-        this.discount = discount;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public String getGameName() {
-        return gameName;
-    }
-
-    public void setGameName(String gameName) {
-        this.gameName = gameName;
-    }
-
-    public String getIconImage() {
-        return iconImage;
-    }
-
-    public void setIconImage(String iconImage) {
-        this.iconImage = iconImage;
-    }
-
-    public long getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(long startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getSize() {
-        return size;
-    }
-
-    public void setSize(String size) {
-        this.size = size;
-    }
-
-    public String getDetailBackImage() {
-        return detailBackImage;
-    }
-
-    public void setDetailBackImage(String detailBackImage) {
-        this.detailBackImage = detailBackImage;
-    }
-
-    public String getDetailImage() {
-        return detailImage;
-    }
-
-    public void setDetailImage(String detailImage) {
-        this.detailImage = detailImage;
-    }
-
-    public String getIntroduce() {
-        return introduce;
-    }
-
-    public void setIntroduce(String introduce) {
-        this.introduce = introduce;
-    }
-
-    public int getIsShelves() {
-        return isShelves;
-    }
-
-    public void setIsShelves(int isShelves) {
-        this.isShelves = isShelves;
-    }
-
-    public int getDownloadNumTrue() {
-        return downloadNumTrue;
-    }
-
-    public void setDownloadNumTrue(int downloadNumTrue) {
-        this.downloadNumTrue = downloadNumTrue;
-    }
-
-    public int getDownloadNum() {
-        return downloadNum;
-    }
-
-    public void setDownloadNum(int downloadNum) {
-        this.downloadNum = downloadNum;
-    }
-
-    public String getDownloadUrl() {
-        return downloadUrl;
-    }
-
-    public void setDownloadUrl(String downloadUrl) {
-        this.downloadUrl = downloadUrl;
-    }
-
-    public int getSearchNumTrue() {
-        return searchNumTrue;
-    }
-
-    public void setSearchNumTrue(int searchNumTrue) {
-        this.searchNumTrue = searchNumTrue;
-    }
-
-    public int getSearchNum() {
-        return searchNum;
-    }
-
-    public void setSearchNum(int searchNum) {
-        this.searchNum = searchNum;
-    }
-
-    public int getStar() {
-        return star;
-    }
-
-    public void setStar(int star) {
-        this.star = star;
-    }
-
-    public String getTypeText() {
-        return typeText;
-    }
-
-    public void setTypeText(String typeText) {
-        this.typeText = typeText;
-    }
-
-    public String getPackageName() {
-        return packageName;
-    }
-
-    public void setPackageName(String packageName) {
-        this.packageName = packageName;
-    }
-
-    public String getVersionCode() {
-        return versionCode;
-    }
-
-    public void setVersionCode(String versionCode) {
-        this.versionCode = versionCode;
-    }
-
-    public long getShelvesTime() {
-        return shelvesTime;
-    }
-
-    public void setShelvesTime(long shelvesTime) {
-        this.shelvesTime = shelvesTime;
-    }
-
-    public int getIsInBook() {
-        return isInBook;
-    }
-
-    public void setIsInBook(int isInBook) {
-        this.isInBook = isInBook;
-    }
-
-    public String getOnlyTag() {
-        return onlyTag;
-    }
-
-    public void setOnlyTag(String onlyTag) {
-        this.onlyTag = onlyTag;
-    }
-
-    public int getBookId() {
-        return bookId;
-    }
-
-    public void setBookId(int bookId) {
-        this.bookId = bookId;
-    }
-
-    public String getBookName() {
-        return bookName;
-    }
-
-    public void setBookName(String bookName) {
-        this.bookName = bookName;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public boolean isBooked() {
-        return booked;
-    }
-
-    public void setBooked(boolean booked) {
-        this.booked = booked;
-    }
-
-    public boolean isCanPreDown() {
-        return isCanPreDown;
-    }
-
-    public void setCanPreDown(boolean canPreDown) {
-        isCanPreDown = canPreDown;
-    }
-
-    public int getExistGift() {
-        return existGift;
-    }
-
-    public void setExistGift(int existGift) {
-        this.existGift = existGift;
-    }
-
-
-    public GameOuterClass.Game getGameV1() {
-        return GameOuterClass.Game.newBuilder()
-                .setBooked(booked)
-                .setBookId(bookId)
-                .setBookName(bookName)
-                .setDetailBackImage(detailBackImage)
-                .setDetailImage(detailImage)
-                .setDownloadNum(downloadNum)
-                .setDownloadNumTrue(downloadNumTrue)
-                .setDownloadUrl(downloadUrl)
-                .setExistGift(existGift)
-                .setGameName(gameName)
-                .setIconImage(iconImage)
-                .setId(id)
-                .setIntroduce(introduce)
-                .setIsCanPreDown(isCanPreDown)
-                .setIsInBook(isInBook)
-                .setPackageName(packageName)
-                .setIsShelves(isShelves)
-                .setOnlyTag(onlyTag)
-                .setSearchNum(searchNum)
-                .setSize(size)
-                .setStar(star)
-                .setStartTime(startTime)
-                .setSearchNum(searchNum)
-                .setShelvesTime(shelvesTime)
-                .setTypeText(typeText)
-                .setUrl(url)
-                .setVersion(version)
-                .setVersionCode(versionCode)
-                .setSearchNumTrue(searchNumTrue)
-                .build();
-    }
-
-}

+ 0 - 184
app/src/main/java/com/kfzs/duanduan/bean/GiftItem.java

@@ -1,184 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  GiftItem</p>
- * @ <p>Description:</p>
- * @ date:  2017/8/11 15:26
- * @ QQ:    315096953
- */
-
-public class GiftItem {
-
-    private int id_ = 0;
-    private int gameId_ = 0;
-    private String giftName_ = "";
-    private int typeId_ = 0;
-    private String giftContent_ = "";
-    private long startTime_ = 0L;
-    private long endTime_ = 0L;
-    private long createdTime_ = 0L;
-    private String useInstruction_ = "";
-    private long receiveNum_ = 0L;
-    private long remain_num = 0L;
-    private int status_ = 0;
-    private long totalNum_ = 0L;
-    private String giftCodes_ = "";
-    private int existGift = 0;
-    private String iconImage = "";
-    private String gameName = "";
-    private int plan_num=0;
-    private float percentum=0;
-
-    public int getPlan_num() {
-        return plan_num;
-    }
-
-    public void setPlan_num(int plan_num) {
-        this.plan_num = plan_num;
-    }
-
-    public float getPercentum() {
-        return percentum;
-    }
-
-    public void setPercentum(float percentum) {
-        this.percentum = percentum;
-    }
-
-    public int getId_() {
-        return id_;
-    }
-
-    public void setId_(int id_) {
-        this.id_ = id_;
-    }
-
-    public int getGameId_() {
-        return gameId_;
-    }
-
-    public void setGameId_(int gameId_) {
-        this.gameId_ = gameId_;
-    }
-
-    public String getGiftName_() {
-        return giftName_;
-    }
-
-    public void setGiftName_(String giftName_) {
-        this.giftName_ = giftName_;
-    }
-
-    public int getTypeId_() {
-        return typeId_;
-    }
-
-    public void setTypeId_(int typeId_) {
-        this.typeId_ = typeId_;
-    }
-
-    public String getGiftContent_() {
-        return giftContent_;
-    }
-
-    public void setGiftContent_(String giftContent_) {
-        this.giftContent_ = giftContent_;
-    }
-
-    public long getStartTime_() {
-        return startTime_;
-    }
-
-    public void setStartTime_(long startTime_) {
-        this.startTime_ = startTime_;
-    }
-
-    public long getEndTime_() {
-        return endTime_;
-    }
-
-    public void setEndTime_(long endTime_) {
-        this.endTime_ = endTime_;
-    }
-
-    public long getCreatedTime_() {
-        return createdTime_;
-    }
-
-    public void setCreatedTime_(long createdTime_) {
-        this.createdTime_ = createdTime_;
-    }
-
-    public String getUseInstruction_() {
-        return useInstruction_;
-    }
-
-    public void setUseInstruction_(String useInstruction_) {
-        this.useInstruction_ = useInstruction_;
-    }
-
-    public long getReceiveNum_() {
-        return receiveNum_;
-    }
-
-    public void setReceiveNum_(long receiveNum_) {
-        this.receiveNum_ = receiveNum_;
-    }
-
-    public long getRemain_num() {
-        return remain_num;
-    }
-
-    public void setRemain_num(long remain_num) {
-        this.remain_num = remain_num;
-    }
-
-    public int getStatus_() {
-        return status_;
-    }
-
-    public void setStatus_(int status_) {
-        this.status_ = status_;
-    }
-
-    public long getTotalNum_() {
-        return totalNum_;
-    }
-
-    public void setTotalNum_(long totalNum_) {
-        this.totalNum_ = totalNum_;
-    }
-
-    public String getGiftCodes_() {
-        return giftCodes_;
-    }
-
-    public void setGiftCodes_(String giftCodes_) {
-        this.giftCodes_ = giftCodes_;
-    }
-
-    public int getExistGift() {
-        return existGift;
-    }
-
-    public void setExistGift(int existGift) {
-        this.existGift = existGift;
-    }
-
-    public String getIconImage() {
-        return iconImage;
-    }
-
-    public void setIconImage(String iconImage) {
-        this.iconImage = iconImage;
-    }
-
-    public String getGameName() {
-        return gameName;
-    }
-
-    public void setGameName(String gameName) {
-        this.gameName = gameName;
-    }
-}

+ 0 - 89
app/src/main/java/com/kfzs/duanduan/bean/GiftList.java

@@ -1,89 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * Created by Administrator on 2017/12/18.
- */
-
-public class GiftList {
-    private String GiftName;// 我让他问题,
-    private String GameName;// 阴阳师,
-    private String UseTime;// 0,
-    private String GameId;// 1,
-    private long EndTime;// 1518672986,
-    private String GiftCode;// ih398351gu,
-    private String Icon;// http;////staticcdn.kuaifazs.com/upload/game/201609/01/ce/09/ibPuD4_100x100.png,
-    private boolean UsedStatus;// false,
-    private String GiftId;// 1
-
-    public String getGiftName() {
-        return GiftName;
-    }
-
-    public void setGiftName(String giftName) {
-        GiftName = giftName;
-    }
-
-    public String getGameName() {
-        return GameName;
-    }
-
-    public void setGameName(String gameName) {
-        GameName = gameName;
-    }
-
-    public String getUseTime() {
-        return UseTime;
-    }
-
-    public void setUseTime(String useTime) {
-        UseTime = useTime;
-    }
-
-    public String getGameId() {
-        return GameId;
-    }
-
-    public void setGameId(String gameId) {
-        GameId = gameId;
-    }
-
-    public long getEndTime() {
-        return EndTime;
-    }
-
-    public void setEndTime(long endTime) {
-        EndTime = endTime;
-    }
-
-    public String getGiftCode() {
-        return GiftCode;
-    }
-
-    public void setGiftCode(String giftCode) {
-        GiftCode = giftCode;
-    }
-
-    public String getIcon() {
-        return Icon;
-    }
-
-    public void setIcon(String icon) {
-        Icon = icon;
-    }
-
-    public boolean isUsedStatus() {
-        return UsedStatus;
-    }
-
-    public void setUsedStatus(boolean usedStatus) {
-        UsedStatus = usedStatus;
-    }
-
-    public String getGiftId() {
-        return GiftId;
-    }
-
-    public void setGiftId(String giftId) {
-        GiftId = giftId;
-    }
-}

+ 0 - 45
app/src/main/java/com/kfzs/duanduan/bean/GuessYouLike.java

@@ -1,45 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  GuessYouLike</p>
- * @ <p>Description:猜你喜欢的返回类</p>
- * @ date:  2017/12/13 13:42
- * @ QQ:    315096953
- */
-
-public class GuessYouLike {
-
-    private int gametypeid = 0;
-
-    private String img = "";
-
-    private List<Game> games = new ArrayList<>();
-
-    public int getGametypeid() {
-        return gametypeid;
-    }
-
-    public void setGametypeid(int gametypeid) {
-        this.gametypeid = gametypeid;
-    }
-
-    public String getImg() {
-        return img;
-    }
-
-    public void setImg(String img) {
-        this.img = img;
-    }
-
-    public List<Game> getGames() {
-        return games;
-    }
-
-    public void setGames(List<Game> games) {
-        this.games = games;
-    }
-}

+ 0 - 40
app/src/main/java/com/kfzs/duanduan/bean/KFIntentKeys.java

@@ -1,40 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * Created by HooRang on 2017/3/3.
- */
-public class KFIntentKeys {
-
-
-    /**
-     * Game's banner
-     */
-    public static final int BANNER_TYPE_GAME = 0x1;
-
-    /**
-     * AD's banner
-     */
-    public static final int BANNER_TYPE_AD = 0x2;
-
-
-    public static final String EXTRA_BEHAIOR = "EXTRA_BEHAIOR";
-    public static final String EXTRA_GAME_ID = "EXTRA_GAME_ID";
-    public static final String EXTRA_PAGE_NUM = "EXTRA_PAGE_NUM";
-    public static final String EXTRA_WEBVIEW_URL = "EXTRA_WEBVIEW_URL";
-    public static final String EXTRA_WEBVIEW_TITLE = "EXTRA_WEBVIEW_TITLE";
-    public static final String EXTRA_WEBVIEW_NO_TITLE = "EXTRA_WEBVIEW_NO_TITLE";
-    public static final String EXTRA_WEBVIEW_GAME_BOOK_ID = "EXTRA_WEBVIEW_GAME_BOOK_ID";
-    public static final String EXTRA_WEBVIEW_GAME_ID = "EXTRA_WEBVIEW_GAME_ID";
-    public static final String EXTRA_WEBVIEW_SHARE_IMGURL = "EXTRA_WEBVIEW_SHARE_IMGURL";
-    public static final String EXTRA_WEBVIEW_GAME_VERSION = "EXTRA_WEBVIEW_GAME_VERSION";
-    public static final String EXTRA_WEBVIEW_PACKAGENAME = "EXTRA_WEBVIEW_PACKAGENAME";
-    public static final String EXTRA_WEBVIEW_GAME_SIZE = "EXTRA_WEBVIEW_GAME_SIZE";
-
-    public static final String EXTRA_GAME_REQUEST_ORDER = "EXTRA_GAME_REQUEST_ORDER";
-
-
-    public static final String EXTRA_CURRENT_PICTURE_INDEX = "EXTRA_CURRENT_PICTURE_INDEX";
-    public static final String EXTRA_CURRENT_PICTURE_COLLECTIONS = "EXTRA_CURRENT_PICTURE_COLLECTIONS";
-
-
-}

+ 0 - 53
app/src/main/java/com/kfzs/duanduan/bean/NewGameRecommend.java

@@ -1,53 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  NewGameRecommend</p>
- * @ <p>Description:</p>
- * @ date:  2017/12/13 11:24
- * @ QQ:    315096953
- */
-
-public class NewGameRecommend {
-
-    private int gameid = 0;
-
-    private String icon = "";
-
-    private String gamename = "";
-
-    private String discount;
-
-    public String getDiscount() {
-        return discount == null ? "" : discount;
-    }
-
-    public void setDiscount(String discount) {
-        this.discount = discount;
-    }
-
-
-    public int getGameid() {
-        return gameid;
-    }
-
-    public void setGameid(int gameid) {
-        this.gameid = gameid;
-    }
-
-    public String getIcon() {
-        return icon;
-    }
-
-    public void setIcon(String icon) {
-        this.icon = icon;
-    }
-
-    public String getGamename() {
-        return gamename;
-    }
-
-    public void setGamename(String gamename) {
-        this.gamename = gamename;
-    }
-}

+ 0 - 48
app/src/main/java/com/kfzs/duanduan/bean/QueryCondition.java

@@ -1,48 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import com.kfzs.duanduan.proto.GameTypeOuterClass;
-
-import java.util.List;
-
-/**
- * Created by HooRang on 2017/2/16.
- */
-public class QueryCondition {
-    int id ;
-    int categoryIcon ;
-    String categoryName ;
-
-    List<GameTypeOuterClass.GameType> tags ;
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public String getCategoryName() {
-        return categoryName;
-    }
-
-    public void setCategoryName(String categoryName) {
-        this.categoryName = categoryName;
-    }
-
-    public int getCategoryIcon() {
-        return categoryIcon;
-    }
-
-    public void setCategoryIcon(int categoryIcon) {
-        this.categoryIcon = categoryIcon;
-    }
-
-    public List<GameTypeOuterClass.GameType> getTags() {
-        return tags;
-    }
-
-    public void setTags(List<GameTypeOuterClass.GameType> tags) {
-        this.tags = tags;
-    }
-}

+ 0 - 75
app/src/main/java/com/kfzs/duanduan/bean/RecyleObj.java

@@ -1,75 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  RecyleObj</p>
- * @ <p>Description:</p>
- * @ date:  2017/6/15 13:19
- * @ QQ:    315096953
- */
-
-public class RecyleObj {
-
-    private RecyleType recyleType;
-
-    private int index;
-
-    private Object dataObj;
-
-    private Boolean isLoaded = false;//是否已经加载过了,用于性能优化
-
-    public Boolean getLoaded() {
-        return isLoaded == null ? false : isLoaded;
-    }
-
-    public void setLoaded(Boolean loaded) {
-        isLoaded = loaded;
-    }
-
-    public int getIndex() {
-        return index;
-    }
-
-    public void setIndex(int index) {
-        this.index = index;
-    }
-
-    public Object getDataObj() {
-        return dataObj;
-    }
-
-    public void setDataObj(Object dataObj) {
-        this.dataObj = dataObj;
-    }
-
-    public RecyleType getRecyleType() {
-        return recyleType;
-    }
-
-    public void setRecyleType(RecyleType recyleType) {
-        this.recyleType = recyleType;
-    }
-
-
-    /**
-     * 生成指定RecyleView的类
-     *
-     * @param recyleType
-     * @param dataObj
-     * @return
-     */
-    public static RecyleObj make(RecyleType recyleType, Object dataObj) {
-        RecyleObj recyleObj = new RecyleObj();
-        recyleObj.setRecyleType(recyleType);
-        recyleObj.setDataObj(dataObj);
-        return recyleObj;
-    }
-
-    public static RecyleObj make(RecyleType recyleType, Object dataObj, int position) {
-        RecyleObj recyleObj = new RecyleObj();
-        recyleObj.setRecyleType(recyleType);
-        recyleObj.setDataObj(dataObj);
-        recyleObj.setIndex(position);
-        return recyleObj;
-    }
-}

+ 0 - 52
app/src/main/java/com/kfzs/duanduan/bean/RecyleType.java

@@ -1,52 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  RecyleType</p>
- * @ <p>Description: 所有RecyleType定义View类型,以后都已经放在这里,并一定要写好注释,恳求!!!</p>
- * @ date:  2017/6/15 13:22
- * @ QQ:    315096953
- */
-
-public enum RecyleType {
-    NONE,//无用占位
-
-    //下面是首页推荐页的Type
-    BANNER,//首页BANNER
-    OWN_ZONE,//专区BANNER
-    NEW_GAME_RECOMMEND,//新游推荐
-    GUESS_YOU_LIKE,//猜你喜欢
-    SPECIAL_GAME_RECOMMEND,//特别推荐
-    RPG,//角色扮演游戏
-    SUBJECT,//专题
-    CARTON,//二次元列表
-
-
-
-    NEW_FIRST,//新品首发,改为人气游戏
-    RECOMMEND,//独家首发
-    NEW_GAME,//最新游戏
-    CHOICES_GAME,//精品游戏
-    DEFINE_GAME,//自定义分组
-    BACK_TOP,//返回到顶层
-
-    //下面是首页礼包页的Type
-    GIFT_BANNER,//首页礼包栏的Banner的View类型
-    ALREADY_INSTALL,//首页礼包栏已安装的View类型
-    OWN_GIFT,//首页礼包栏专属礼包独家礼包的View类型
-
-
-    //下面是首页开服页的Type
-    START_TAB_NAME,         //首页开服一栏中,Tab的View类型
-    START_SERVICE_TODAY,    //首页开服一栏中,今日开服View的类型
-    START_SERVICE_TOMORROW, //首页开服一栏中,明日开服View的类型
-    START_TEST_TODAY,       //首页开服一栏中,今日开测的View类型
-    START_TEST_TOMORROW,    //首页开服一栏中,明日开测的View类型
-
-
-    //下面是首页排行页的Type
-    RANK_TYPE,//首页排行列表分类选择View的类型
-    RANK_TOP3,//首页排行列表Top3的View类型
-    RANK_LIST,//首页排行列表List的View类型
-
-}

+ 0 - 33
app/src/main/java/com/kfzs/duanduan/bean/SearchRecordBean.java

@@ -1,33 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import java.util.Date;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  SearchRecordBean</p>
- * @ <p>Description: 搜索历史的Bean类</p>
- * @ date:  2017/8/19 10:02
- * @ QQ:    315096953
- */
-
-public class SearchRecordBean {
-    private String key;
-    private Date date;//暂时没有用。也许这个Bean以后可以删除,直接String
-
-
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    public Date getDate() {
-        return date;
-    }
-
-    public void setDate(Date date) {
-        this.date = date;
-    }
-}

+ 0 - 57
app/src/main/java/com/kfzs/duanduan/bean/SelfInfoPojo.java

@@ -1,57 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by sinlov on 17/3/6.
- */
-public class SelfInfoPojo {
-    private boolean canEdit;
-    private Integer iconID;
-    private String hint;
-    private String info;
-
-    public boolean isCanEdit() {
-        return canEdit;
-    }
-
-    public void setCanEdit(boolean canEdit) {
-        this.canEdit = canEdit;
-    }
-
-    public Integer getIconID() {
-        return iconID;
-    }
-
-    public void setIconID(Integer iconID) {
-        this.iconID = iconID;
-    }
-
-    public String getHint() {
-        return hint;
-    }
-
-    public void setHint(String hint) {
-        this.hint = hint;
-    }
-
-    public String getInfo() {
-        return info;
-    }
-
-    public void setInfo(String info) {
-        this.info = info;
-    }
-}

+ 0 - 41
app/src/main/java/com/kfzs/duanduan/bean/SpecialRecommend.java

@@ -1,41 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  SpecialRecommend</p>
- * @ <p>Description:特别推荐返回类</p>
- * @ date:  2017/12/13 15:16
- * @ QQ:    315096953
- */
-
-public class SpecialRecommend {
-
-    private String name = "";
-    private String img = "";
-    private Game game=new Game();
-
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getImg() {
-        return img;
-    }
-
-    public void setImg(String img) {
-        this.img = img;
-    }
-
-    public Game getGame() {
-        return game;
-    }
-
-    public void setGame(Game game) {
-        this.game = game;
-    }
-}

+ 0 - 29
app/src/main/java/com/kfzs/duanduan/bean/UserRecord.java

@@ -1,29 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import java.io.Serializable;
-
-/**
- * Created by Administrator on 2018/1/16.
- */
-
-public class UserRecord implements Serializable {
-
-    private int loan_state;//是否允许借款Yes=1,No=2
-    private int have_access_state;//是否借过款Yes=1,No=2
-
-    public int getLoan_state() {
-        return loan_state;
-    }
-
-    public void setLoan_state(int loan_state) {
-        this.loan_state = loan_state;
-    }
-
-    public int getHave_access_state() {
-        return have_access_state;
-    }
-
-    public void setHave_access_state(int have_access_state) {
-        this.have_access_state = have_access_state;
-    }
-}

+ 0 - 279
app/src/main/java/com/kfzs/duanduan/bean/VipStyle.java

@@ -1,279 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  VipStyle</p>
- * @ <p>Description:不同渠道的不同主题图片和配色等</p>
- * @ date:  2017/12/14 14:36
- * @ QQ:    315096953
- */
-
-public class VipStyle {
-
-    private int id = 1;
-    private String banner = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_banner.png";
-    private String kaixinwan1 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_kaixinwan_1.png";
-    private String kaixinwan2 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_kaixinwan_2.png";
-    private String cate1 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_cate_1.png";
-    private String cate2 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_cate_2.png";
-    private String star1 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_star_1.png";
-    private String star2 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_star_2.png";
-    private String receive = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_receive.png";
-    private String luntan1 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_luntan_1.png";
-    private String luntan2 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_luntan_2.png";
-    private String buttonback = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_button_back.png";
-    private String wo1 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_wo_1.png";
-    private String wo2 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_wo_2.png";
-    private String download = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_download.png";
-    private String rhombus = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_rhombus.png";
-    private String game1 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_game_1.png";
-    private String game2 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_game_2.png";
-    private String more = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_more.png";
-    private int viptypeid = 1;//默认为1
-    private String viptypename = "好玩";
-    private String gamebookimg = "";
-    private String indexbanner = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_index_banner.png";
-    private String taozhewan = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_taozhewan.png";
-    private String kaixinwan = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_kaixwan.png";
-    private String yiqiwan = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_yiqiw.png";
-
-    private String task_1 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_cate_1.png";
-    private String task_2 = "http://7xp90a.com1.z0.glb.clouddn.com/miaofan_cate_2.png";
-
-    private static VipStyle mVipStyle;
-
-    public static synchronized VipStyle getInstance() {
-        if (mVipStyle == null) {
-            mVipStyle = new VipStyle();
-        }
-        return mVipStyle;
-    }
-
-    public void init(VipStyle vipStyle) {
-        mVipStyle = vipStyle;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public String getBanner() {
-        return banner;
-    }
-
-    public void setBanner(String banner) {
-        this.banner = banner;
-    }
-
-    public String getKaixinwan1() {
-        return kaixinwan1;
-    }
-
-    public void setKaixinwan1(String kaixinwan1) {
-        this.kaixinwan1 = kaixinwan1;
-    }
-
-    public String getKaixinwan2() {
-        return kaixinwan2;
-    }
-
-    public void setKaixinwan2(String kaixinwan2) {
-        this.kaixinwan2 = kaixinwan2;
-    }
-
-    public String getCate1() {
-        return cate1;
-    }
-
-    public void setCate1(String cate1) {
-        this.cate1 = cate1;
-    }
-
-    public String getCate2() {
-        return cate2;
-    }
-
-    public void setCate2(String cate2) {
-        this.cate2 = cate2;
-    }
-
-    public String getStar1() {
-        return star1;
-    }
-
-    public void setStar1(String star1) {
-        this.star1 = star1;
-    }
-
-    public String getStar2() {
-        return star2;
-    }
-
-    public void setStar2(String star2) {
-        this.star2 = star2;
-    }
-
-    public String getReceive() {
-        return receive;
-    }
-
-    public void setReceive(String receive) {
-        this.receive = receive;
-    }
-
-    public String getLuntan1() {
-        return luntan1;
-    }
-
-    public void setLuntan1(String luntan1) {
-        this.luntan1 = luntan1;
-    }
-
-    public String getLuntan2() {
-        return luntan2;
-    }
-
-    public void setLuntan2(String luntan2) {
-        this.luntan2 = luntan2;
-    }
-
-    public String getButtonback() {
-        return buttonback;
-    }
-
-    public void setButtonback(String buttonback) {
-        this.buttonback = buttonback;
-    }
-
-    public String getWo1() {
-        return wo1;
-    }
-
-    public void setWo1(String wo1) {
-        this.wo1 = wo1;
-    }
-
-    public String getWo2() {
-        return wo2;
-    }
-
-    public void setWo2(String wo2) {
-        this.wo2 = wo2;
-    }
-
-    public String getDownload() {
-        return download;
-    }
-
-    public void setDownload(String download) {
-        this.download = download;
-    }
-
-    public String getRhombus() {
-        return rhombus;
-    }
-
-    public void setRhombus(String rhombus) {
-        this.rhombus = rhombus;
-    }
-
-    public String getGame1() {
-        return game1;
-    }
-
-    public void setGame1(String game1) {
-        this.game1 = game1;
-    }
-
-    public String getGame2() {
-        return game2;
-    }
-
-    public void setGame2(String game2) {
-        this.game2 = game2;
-    }
-
-    public String getMore() {
-        return more;
-    }
-
-    public void setMore(String more) {
-        this.more = more;
-    }
-
-    public int getViptypeid() {
-        return viptypeid;
-    }
-
-    public void setViptypeid(int viptypeid) {
-        this.viptypeid = viptypeid;
-    }
-
-    public String getViptypename() {
-        return viptypename;
-    }
-
-    public void setViptypename(String viptypename) {
-        this.viptypename = viptypename;
-    }
-
-    public String getGamebookimg() {
-        return gamebookimg;
-    }
-
-    public void setGamebookimg(String gamebookimg) {
-        this.gamebookimg = gamebookimg;
-    }
-
-    public String getIndexbanner() {
-        return indexbanner;
-    }
-
-    public void setIndexbanner(String indexbanner) {
-        this.indexbanner = indexbanner;
-    }
-
-    public String getTaozhewan() {
-        return taozhewan;
-    }
-
-    public void setTaozhewan(String taozhewan) {
-        this.taozhewan = taozhewan;
-    }
-
-    public String getKaixinwan() {
-        return kaixinwan;
-    }
-
-    public void setKaixinwan(String kaixinwan) {
-        this.kaixinwan = kaixinwan;
-    }
-
-    public String getYiqiwan() {
-        return yiqiwan;
-    }
-
-    public void setYiqiwan(String yiqiwan) {
-        this.yiqiwan = yiqiwan;
-    }
-
-    public String getTask_1() {
-        return task_1;
-    }
-
-    public void setTask_1(String task_1) {
-        this.task_1 = task_1;
-    }
-
-    public String getTask_2() {
-        return task_2;
-    }
-
-    public void setTask_2(String task_2) {
-        this.task_2 = task_2;
-    }
-}

+ 0 - 19
app/src/main/java/com/kfzs/duanduan/bean/YinkerData.java

@@ -1,19 +0,0 @@
-package com.kfzs.duanduan.bean;
-
-import java.io.Serializable;
-
-/**
- * Created by realicing on 2018/4/3.
- * realicing@sina.com
- */
-public class YinkerData implements Serializable {
-    private String entry_page_url;
-
-    public String getEntry_page_url() {
-        return entry_page_url;
-    }
-
-    public void setEntry_page_url(String entry_page_url) {
-        this.entry_page_url = entry_page_url;
-    }
-}

+ 0 - 98
app/src/main/java/com/kfzs/duanduan/bll/GameListBll.java

@@ -1,98 +0,0 @@
-package com.kfzs.duanduan.bll;
-
-import com.android.volleyplus.Response;
-import com.kfzs.appstore.utils.restful.KFZSNetwork;
-import com.kfzs.duanduan.KFZSApp;
-import com.sheep.jiuyan.samllsheep.R;
-import com.kfzs.duanduan.utils.dlg.HelperUtils;
-import com.kfzs.duanduan.utils.net.APIRequestInstance;
-import com.kfzs.duanduan.utils.net.APIRequestV2;
-import com.kfzs.duanduan.bean.BaseMsg;
-
-import java.util.HashMap;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  GameListBll</p>
- * @ <p>Description:各种游戏列表相关的业务类,都全放这儿吧</p>
- * @ <p>Description:以后所有请求业务类全放bll包名下规范就好了。。。</p>
- * @ date:  2017/12/13 11:34
- * @ QQ:    315096953
- */
-
-public class GameListBll {
-
-
-    /**
-     * 获取游戏推荐列表
-     *
-     * @param page     页面,从1开始
-     * @param per_page 每页显示个数
-     * @param listener 回调
-     */
-    public void getNewGameRecommendList(Integer page, Integer per_page, Response.Listener<BaseMsg> listener) {
-        HashMap<String, String> hashMap = new HashMap<>();
-        if (page != null) {
-            hashMap.put("page", (page < 1 ? 1 : page) + "");
-        }
-        if (per_page != null) {
-            hashMap.put("per_page", (per_page < 1 ? 10 : per_page) + "");
-        }
-
-        APIRequestV2 apiRequestV2 = APIRequestInstance.getReqUrlV2("getNewGameRecommendList",
-                UrlBll.V2.NEW_GAME_RECOMMEND, hashMap, listener,
-                HelperUtils.makeErr(KFZSApp.context.getString(R.string.error_package_link)));
-        KFZSNetwork.addRequest(apiRequestV2);
-    }
-
-
-    /**
-     * 猜你喜欢接口
-     *
-     * @param listener
-     */
-    public void getGuessYouLike(Response.Listener<BaseMsg> listener) {
-        APIRequestV2 apiRequestV2 = APIRequestInstance.getReqUrlV2("getGuessYouLike",
-                UrlBll.V2.GUESS_YOU_LIKE, null, listener,
-                HelperUtils.makeErr(KFZSApp.context.getString(R.string.unknown_error)));
-        KFZSNetwork.addRequest(apiRequestV2);
-    }
-
-
-    /**
-     * 取特别推荐的接口
-     *
-     * @param listener
-     */
-    public void getSpecialRecommend(Response.Listener<BaseMsg> listener) {
-        APIRequestV2 apiRequestV2 = APIRequestInstance.getReqUrlV2("getSpecialRecommend",
-                UrlBll.V2.SPECIAL_RECOMMEND, null, listener,
-                HelperUtils.makeErr(KFZSApp.context.getString(R.string.unknown_error)));
-        KFZSNetwork.addRequest(apiRequestV2);
-    }
-
-
-    /**
-     * 获取角色扮演列表和二次元以及专题列表
-     *
-     * @param listener
-     */
-    public void getCartonRPGEtc(Response.Listener<BaseMsg> listener) {
-        APIRequestV2 apiRequestV2 = APIRequestInstance.getReqUrlV2("getSpecialRecommend",
-                UrlBll.V2.CATE_RECOMMEND, null, listener,
-                HelperUtils.makeErr(KFZSApp.context.getString(R.string.unknown_error)));
-        KFZSNetwork.addRequest(apiRequestV2);
-    }
-
-    /**
-     * 新游预约推荐列表获取
-     *
-     * @param listener
-     */
-    public void getNewGameBook(Response.Listener<BaseMsg> listener) {
-        APIRequestV2 apiRequestV2 = APIRequestInstance.getReqUrlV2("getSpecialRecommend",
-                UrlBll.V2.NEW_GAME_BOOK, null, listener,
-                HelperUtils.makeErr(KFZSApp.context.getString(R.string.unknown_error)));
-        KFZSNetwork.addRequest(apiRequestV2);
-    }
-}

+ 0 - 214
app/src/main/java/com/kfzs/duanduan/bll/UrlBll.java

@@ -1,214 +0,0 @@
-package com.kfzs.duanduan.bll;
-
-
-import com.sheep.jiuyan.samllsheep.BuildConfig;
-
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by sinlov on 17/2/17.
- */
-public final class UrlBll {
-
-    /**
-     * 支持协议类型 http
-     */
-    public static final String PROTOCOL_HTTP = "http://";
-    /**
-     * 支持协议类型 https
-     */
-    public static final String PROTOCOL_HTTPS = "https://";
-    /**
-     * 支持协议类型 socket
-     */
-    public static final String PROTOCOL_SOCKET = "socket://";
-    /**
-     * 支持协议类型 resource
-     */
-    public static final String PROTOCOL_RESOURCE = "res://";
-
-    //    public static final String REGULAR_URL = "^https?:\\/\\/(([a-zA-Z0-9_-])+(\\.)?)*(:\\d+)?(\\/((\\.)?(\\?)?=?&?[a-zA-Z0-9_-|#|%](\\?)?)*)*$";
-    public static final String REGULAR_URL = "^https*:\\/\\/(([a-zA-Z0-9_-])+(\\.)?)*(:\\d+)?(\\/((\\.)?(\\?)?=?&?[a-zA-Z0-9_-|#|%](\\?)?)*)*$";
-
-    /*
-     ******************** start所有的地址根 ********************
-     */
-
-    /**
-     * API服务器地址
-     */
-    public static final String API_DOMAIN = PROTOCOL_HTTP + BuildConfig.API_DOMAIN;
-
-    public static final String API_VERSION = API_DOMAIN + "/v1";
-
-    public static final String API_VERSION_V2 = API_DOMAIN + "/v2";
-
-    public final class IntentKey {
-        public static final String CERTIFICATION_GAME_CODE = "kfzs:duanduan:game:code";
-        public static final String CERTIFICATION_GAME_PACKAGE_NAME = "kfzs:duanduan:game:package:name";
-        public static final String CERTIFICATION_GAME_PACKAGE_ACTIVITY = "kfzs:duanduan:game:package:activity";
-    }
-
-    public final class HeadParams {
-        public static final String AUTHORIZATION = "Authorization";
-        public static final String SECRET_KEY = "SECRETKEY";
-        public static final String DD_CHANNEL = "DDCHANNEL";
-        public static final String ANDROID_THEME = "kfsz-android-theme";
-    }
-
-    public final class HeadValues {
-        public static final String THEME_NO_TITLE = "no-title";
-    }
-
-    public final class UserApi {
-        public static final String USER = API_VERSION + "/user";
-        public static final String SELF = USER + "/self";
-        public static final String CHANGE_PASS = USER + "/channgepass";
-        public static final String CHANGE_NICKNAME = USER + "/changenickname";
-        public static final String BIND_PHONE = USER + "/bind";
-        public static final String BIND_PHONE_STEP_ONE = "1";
-        public static final String BIND_PHONE_STEP_TWO = "2";
-    }
-
-    public final class AuthApi {
-        public static final String AUTH = API_VERSION + "/auth";
-        public static final String CAPTCHA = AUTH + "/captcha";
-        public static final String FIND_PWD = AUTH + "/findPwd";
-        public static final String LOGIN = AUTH + "/login";
-        public static final String LOGIN_SMS = AUTH + "/login_by_sms";
-        public static final String SMS_LOGIN = AUTH + "/sms_for_login";
-
-        public static final String REGISTER = AUTH + "/register";
-        public static final String SIGN_OUT = AUTH + "/signout";
-        public static final String VERIFY = AUTH + "/verify";
-    }
-
-    public static class V2 {
-        public static final String NEW_GAME_BOOK = API_DOMAIN + "/v2/recommend/book_recommend";
-        public static final String NEW_GAME_RECOMMEND = API_DOMAIN + "/v2/recommend/new_recommend";
-        public static final String GUESS_YOU_LIKE = API_DOMAIN + "/v2/recommend/speculate_recommend";
-        public static final String SPECIAL_RECOMMEND = API_DOMAIN + "/v2/recommend/game_recommend";
-        public static final String CATE_RECOMMEND = API_DOMAIN + "/v2/recommend/cate_recommend";
-        public static final String VIP_STYLE = API_DOMAIN + "/v2/vip_img";
-
-        //借着玩(能否借)
-        public static final String BORROW_PLAY_LOAN_USERRECORD = API_DOMAIN + "/v2/loan/userRecord";
-
-    }
-
-    //TODO 写个注释要死人啊??
-    public static class AppStoreApi {
-        public static final String RECOMMEND_GAME_GROUPS = API_VERSION + "/index_game";
-        public static final String GAME_LISTS = API_VERSION + "/game";
-        public static final String COUPON = API_VERSION + "/voucher/";
-        public static final String COUPON_RECEIVE = API_VERSION + "/coupon/receive_list";
-
-        //代金券
-        public static final String VOUCHER_RECEIVE_LSIT = API_VERSION + "/voucher/receive_list/";
-        public static final String VOUCHER_EXPIRED_LSIT = API_VERSION + "/voucher/expired_list/";
-
-        //上传游戏下载计数统计
-        public static final String GAME_COUNT_UPDATE = API_VERSION + "/game/";
-        public static final String GAME_PALYED = API_VERSION + "/played_game";
-        public static final String GAME_TYPES = API_VERSION + "/gametype/";//所有游戏类型-列表
-        public static final String GAME_TYPES_SPECIAL = API_VERSION + "/gametype/special/";//所有游戏类型-块状部分
-        //搜索页的请求
-        public static final String SEARCH = API_VERSION + "/search";
-        public static final String SEARCH_KEYWORDS = API_VERSION + "/search/game_names";
-        public static final String BANNER = API_VERSION + "/index_banner";
-        //开服列表
-        public static final String OPEN_SERVER = API_VERSION + "/open_server";
-        //开测列表
-        public static final String OPEN_TEST = API_VERSION + "/open_ts";
-        //意见反馈接口
-        public static final String ADVICE = API_VERSION + "/advice";
-        public static final String HOTWORDS = API_VERSION + "/hotwords";
-        public static final String GUESS_YOU_LIKE = API_VERSION + "/game/guess";
-
-
-        public static final int PAGE_CATEGORY_RANK = 1;
-        public static final int PAGE_SOLE_GAME = 2;
-        public static final int PAGE_NEW_GAME = 3;
-
-    }
-
-    public static class GameBookAllApi {
-        public static final String GAME_ALL_BOOK = API_VERSION + "/bookgame/all";
-    }
-
-    public static class GameApi {
-        public static final String GAME = API_VERSION + "/game/";
-        public static final String GAME_GUESS = API_VERSION + "/game/guess?";
-        public static final String DOWNLOAD_REDIRECT = API_VERSION + "/download_redirect/?";
-    }
-
-    public static class Gift {
-        public static final String GIFT_LIST = API_VERSION + "/gift/";
-        //已经玩过游戏礼包的接口
-        public static final String GIFT_PLAYED = API_VERSION + "/gift/played";
-        public static final String GIFT_EXCHANGE = API_VERSION + "/gift_codes/receive";
-        public static final String GIFT_BANNER = API_VERSION + "/gift_banner/all";
-        public static final String GAME_GIFT_LIST = API_VERSION + "/shelves_gift/gift_list?";
-
-        //已领取礼包
-        public static final String GIFT_RECEIVE_LIST = API_VERSION_V2 + "/shelves_gift/receive_list/";
-        //已过期礼包
-        public static final String GIFT_EXPIRED_LIST = API_VERSION_V2 + "/shelves_gift/expired_list/";
-
-    }
-
-    public static class GameBookApi {
-        public static final String GAME_BOOK_POST = API_VERSION + "/bookgame";
-        public static final String GAME_BOOK_MY = GAME_BOOK_POST + "/my";
-    }
-
-    public final class SDKApi {
-        public static final String SDK = API_VERSION + "/sdk";
-        //上传用户通讯录
-        public static final String SDK_CONTACT = API_VERSION + "/user/updateContact";
-    }
-
-    //开服,开测数据
-    public final class Server {
-        public static final String OPEN_SERVER = API_VERSION + "/open_server/";
-        public static final String OPEN_SERVER_GAMEDETAIL = API_VERSION + "/open_server/server_list?";
-        public static final String OPEN_TEST = API_VERSION + "/open_ts/";
-    }
-
-    public final class UploadPic {
-        public static final String UPLOAD_PIC = API_VERSION + "/uploadPic";
-        public static final String AVATAR = UPLOAD_PIC + "/avatar";
-        public static final String UPLOAD_PIC_TEST = UPLOAD_PIC + "/uploadPic";
-    }
-
-    public static class VersionControlApi {
-
-        public static final String APP_VERSION_INFO = API_VERSION + "/version";
-
-
-    }
-
-    public static class AdvertisementApi {
-
-        public static final String SPLASH_ADVERTISEMENT = API_VERSION + "/splash";
-        public static final String RECOMMENDED_ADVERTISEMENT = API_VERSION + "/recommended_game";
-        public static final String SPLASH_ADVERTISEMENT_FILE_NAME = "/advertisementImage";
-        public static final String SPLASH_ADVERTISEMENT_IMAGE_NAME = "/splash_image.png";
-    }
-
-}
-
-

+ 58 - 0
app/src/main/java/com/kfzs/duanduan/cardview/BitmapUtils.java

@@ -0,0 +1,58 @@
+package com.kfzs.duanduan.cardview;
+
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+
+public class BitmapUtils {
+    public static int MIN_WIDTH = 100;
+
+    /**
+     * 按最大边按一定大小缩放图片
+     *
+     * @param resources
+     * @param resId
+     * @param maxSize 压缩后最大长度
+     * @return
+     */
+    public static Bitmap scaleImage(Resources resources, int resId, int maxSize) {
+        BitmapFactory.Options options = new BitmapFactory.Options();
+        options.inJustDecodeBounds = true;
+        BitmapFactory.decodeResource(resources, resId, options);
+        options.inSampleSize = calculateInSampleSize(options, maxSize, maxSize);
+        options.inJustDecodeBounds = false;
+
+        return BitmapFactory.decodeResource(resources, resId, options);
+    }
+
+    /**
+     * 计算inSampleSize
+     * @param options
+     * @param reqWidth
+     * @param reqHeight
+     * @return
+     */
+    private static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {
+        int height = options.outHeight;
+        int width = options.outWidth;
+        int inSampleSize = 1;
+        if (width < MIN_WIDTH) {
+            return inSampleSize;
+        } else {
+            int heightRatio;
+            if (width > height && reqWidth < reqHeight || width < height && reqWidth > reqHeight) {
+                heightRatio = reqWidth;
+                reqWidth = reqHeight;
+                reqHeight = heightRatio;
+            }
+
+            if (height > reqHeight || width > reqWidth) {
+                heightRatio = Math.round((float) height / (float) reqHeight);
+                int widthRatio = Math.round((float) width / (float) reqWidth);
+                inSampleSize = heightRatio < widthRatio ? widthRatio : heightRatio;
+            }
+
+            return inSampleSize;
+        }
+    }
+}

+ 74 - 0
app/src/main/java/com/kfzs/duanduan/cardview/BlurBitmapUtils.java

@@ -0,0 +1,74 @@
+package com.kfzs.duanduan.cardview;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+
+import android.renderscript.Allocation;
+import android.renderscript.Element;
+import android.renderscript.RenderScript;
+import android.renderscript.ScriptIntrinsicBlur;
+import android.widget.ImageView;
+
+/**
+ * RenderScript图片高斯模糊
+ * Created by jameson on 9/2/16.
+ */
+public class BlurBitmapUtils {
+    /**
+     * 建议模糊度(在0.0到25.0之间)
+     */
+    private static final int BLUR_RADIUS = 20;
+    private static final int SCALED_WIDTH = 100;
+    private static final int SCALED_HEIGHT = 100;
+
+    public static void blur(ImageView imageView, Bitmap bitmap) {
+        blur(imageView, bitmap, BLUR_RADIUS);
+    }
+
+    public static void blur(ImageView imageView, Bitmap bitmap, int radius) {
+        imageView.setImageBitmap(getBlurBitmap(imageView.getContext(), bitmap, radius));
+    }
+
+    public static Bitmap getBlurBitmap(Context context, Bitmap bitmap) {
+        return getBlurBitmap(context, bitmap, BLUR_RADIUS);
+    }
+
+    /**
+     * 得到模糊后的bitmap
+     * thanks http://wl9739.github.io/2016/07/14/教你一分钟实现模糊效果/
+     *
+     * @param context
+     * @param bitmap
+     * @param radius
+     * @return
+     */
+    public static Bitmap getBlurBitmap(Context context, Bitmap bitmap, int radius) {
+        // 将缩小后的图片做为预渲染的图片。
+        Bitmap inputBitmap = Bitmap.createScaledBitmap(bitmap, SCALED_WIDTH, SCALED_HEIGHT, false);
+        // 创建一张渲染后的输出图片。
+        Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap);
+
+        // 创建RenderScript内核对象
+        RenderScript rs = RenderScript.create(context);
+        // 创建一个模糊效果的RenderScript的工具对象
+        ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
+
+        // 由于RenderScript并没有使用VM来分配内存,所以需要使用Allocation类来创建和分配内存空间。
+        // 创建Allocation对象的时候其实内存是空的,需要使用copyTo()将数据填充进去。
+        Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap);
+        Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap);
+
+        // 设置渲染的模糊程度, 25f是最大模糊度
+        blurScript.setRadius(radius);
+        // 设置blurScript对象的输入内存
+        blurScript.setInput(tmpIn);
+        // 将输出数据保存到输出内存中
+        blurScript.forEach(tmpOut);
+
+        // 将数据填充到Allocation中
+        tmpOut.copyTo(outputBitmap);
+
+        return outputBitmap;
+    }
+
+}

+ 61 - 0
app/src/main/java/com/kfzs/duanduan/cardview/CardAdapter.java

@@ -0,0 +1,61 @@
+package com.kfzs.duanduan.cardview;
+
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Created by jameson on 8/30/16.
+ */
+public class CardAdapter extends RecyclerView.Adapter<CardAdapter.ViewHolder> {
+    private List<Integer> mList = new ArrayList<>();
+    private CardAdapterHelper mCardAdapterHelper = new CardAdapterHelper();
+
+    public CardAdapter(List<Integer> mList) {
+        this.mList = mList;
+    }
+
+    @Override
+    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_card_item, parent, false);
+        mCardAdapterHelper.onCreateViewHolder(parent, itemView);
+        return new ViewHolder(itemView);
+    }
+
+    @Override
+    public void onBindViewHolder(final ViewHolder holder, final int position) {
+        mCardAdapterHelper.onBindViewHolder(holder.itemView, position, getItemCount());
+        holder.mImageView.setImageResource(mList.get(position));
+        holder.mImageView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+               G.showToast( "" + position);
+            }
+        });
+    }
+
+    @Override
+    public int getItemCount() {
+        return mList.size();
+    }
+
+    public class ViewHolder extends RecyclerView.ViewHolder {
+        public final ImageView mImageView;
+
+        public ViewHolder(final View itemView) {
+            super(itemView);
+            mImageView = (ImageView) itemView.findViewById(R.id.imageView);
+        }
+
+    }
+
+}

+ 46 - 0
app/src/main/java/com/kfzs/duanduan/cardview/CardAdapterHelper.java

@@ -0,0 +1,46 @@
+package com.kfzs.duanduan.cardview;
+
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.view.ViewGroup;
+
+
+
+/**
+ * adapter中调用onCreateViewHolder, onBindViewHolder
+ * Created by jameson on 9/1/16.
+ */
+public class CardAdapterHelper {
+    private int mPagePadding = 15;
+    private int mShowLeftCardWidth = 15;
+
+    public void onCreateViewHolder(ViewGroup parent, View itemView) {
+        RecyclerView.LayoutParams lp = (RecyclerView.LayoutParams) itemView.getLayoutParams();
+        lp.width = parent.getWidth() - ScreenUtil.dip2px(itemView.getContext(), 2 * (mPagePadding + mShowLeftCardWidth));
+        itemView.setLayoutParams(lp);
+    }
+
+    public void onBindViewHolder(View itemView, final int position, int itemCount) {
+        int padding = ScreenUtil.dip2px(itemView.getContext(), mPagePadding);
+        itemView.setPadding(padding, 0, padding, 0);
+        int leftMarin = position == 0 ? padding + ScreenUtil.dip2px(itemView.getContext(), mShowLeftCardWidth) : 0;
+        int rightMarin = position == itemCount - 1 ? padding + ScreenUtil.dip2px(itemView.getContext(), mShowLeftCardWidth) : 0;
+        setViewMargin(itemView, leftMarin, 0, rightMarin, 0);
+    }
+
+    private void setViewMargin(View view, int left, int top, int right, int bottom) {
+        ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
+        if (lp.leftMargin != left || lp.topMargin != top || lp.rightMargin != right || lp.bottomMargin != bottom) {
+            lp.setMargins(left, top, right, bottom);
+            view.setLayoutParams(lp);
+        }
+    }
+
+    public void setPagePadding(int pagePadding) {
+        mPagePadding = pagePadding;
+    }
+
+    public void setShowLeftCardWidth(int showLeftCardWidth) {
+        mShowLeftCardWidth = showLeftCardWidth;
+    }
+}

+ 24 - 0
app/src/main/java/com/kfzs/duanduan/cardview/CardLinearSnapHelper.java

@@ -0,0 +1,24 @@
+package com.kfzs.duanduan.cardview;
+
+import android.support.annotation.NonNull;
+import android.support.v7.widget.LinearSnapHelper;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+
+/**
+ * 防止卡片在第一页和最后一页因无法"居中"而一直循环调用onScrollStateChanged-->SnapHelper.snapToTargetExistingView-->onScrollStateChanged
+ * Created by jameson on 9/3/16.
+ */
+public class CardLinearSnapHelper extends LinearSnapHelper {
+    public boolean mNoNeedToScroll = false;
+
+    @Override
+    public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView) {
+        if (mNoNeedToScroll) {
+            return new int[]{0, 0};
+        } else {
+            return super.calculateDistanceToFinalSnap(layoutManager, targetView);
+        }
+    }
+
+}

+ 150 - 0
app/src/main/java/com/kfzs/duanduan/cardview/CardScaleHelper.java

@@ -0,0 +1,150 @@
+package com.kfzs.duanduan.cardview;
+
+import android.content.Context;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+
+/**
+ * Created by jameson on 8/30/16.
+ */
+public class CardScaleHelper {
+    private RecyclerView mRecyclerView;
+    private Context mContext;
+
+    private float mScale = 0.9f; // 两边视图scale
+    private int mPagePadding = 15; // 卡片的padding, 卡片间的距离等于2倍的mPagePadding
+    private int mShowLeftCardWidth = 15;   // 左边卡片显示大小
+
+    private int mCardWidth; // 卡片宽度
+    private int mOnePageWidth; // 滑动一页的距离
+    private int mCardGalleryWidth;
+
+    private int mCurrentItemPos;
+    private int mCurrentItemOffset;
+
+    private CardLinearSnapHelper mLinearSnapHelper = new CardLinearSnapHelper();
+
+    public void attachToRecyclerView(final RecyclerView mRecyclerView) {
+        // 开启log会影响滑动体验, 调试时才开启
+        LogUtils.mLogEnable = false;
+        this.mRecyclerView = mRecyclerView;
+        mContext = mRecyclerView.getContext();
+        mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
+            @Override
+            public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
+                super.onScrollStateChanged(recyclerView, newState);
+                if (newState == RecyclerView.SCROLL_STATE_IDLE) {
+                    mLinearSnapHelper.mNoNeedToScroll = mCurrentItemOffset == 0 || mCurrentItemOffset == getDestItemOffset(mRecyclerView.getAdapter().getItemCount() - 1);
+                } else {
+                    mLinearSnapHelper.mNoNeedToScroll = false;
+                }
+            }
+
+            @Override
+            public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
+                super.onScrolled(recyclerView, dx, dy);
+                // dx>0则表示右滑, dx<0表示左滑, dy<0表示上滑, dy>0表示下滑
+                if(dx != 0){//去掉奇怪的内存疯涨问题
+                    mCurrentItemOffset += dx;
+                    computeCurrentItemPos();
+                    LogUtils.v(String.format("dx=%s, dy=%s, mScrolledX=%s", dx, dy, mCurrentItemOffset));
+                    onScrolledChangedCallback();
+                }
+            }
+        });
+
+        initWidth();
+        mLinearSnapHelper.attachToRecyclerView(mRecyclerView);
+    }
+
+    /**
+     * 初始化卡片宽度
+     */
+    private void initWidth() {
+        mRecyclerView.post(new Runnable() {
+            @Override
+            public void run() {
+                mCardGalleryWidth = mRecyclerView.getWidth();
+                mCardWidth = mCardGalleryWidth - ScreenUtil.dip2px(mContext, 2 * (mPagePadding + mShowLeftCardWidth));
+                mOnePageWidth = mCardWidth;
+                mRecyclerView.smoothScrollToPosition(mCurrentItemPos);
+                onScrolledChangedCallback();
+            }
+        });
+    }
+
+    public void setCurrentItemPos(int currentItemPos) {
+        this.mCurrentItemPos = currentItemPos;
+    }
+
+    public int getCurrentItemPos() {
+        return mCurrentItemPos;
+    }
+
+    private int getDestItemOffset(int destPos) {
+        return mOnePageWidth * destPos;
+    }
+
+    /**
+     * 计算mCurrentItemOffset
+     */
+    private void computeCurrentItemPos() {
+        if (mOnePageWidth <= 0) return;
+        boolean pageChanged = false;
+        // 滑动超过一页说明已翻页
+        if (Math.abs(mCurrentItemOffset - mCurrentItemPos * mOnePageWidth) >= mOnePageWidth) {
+            pageChanged = true;
+        }
+        if (pageChanged) {
+            int tempPos = mCurrentItemPos;
+
+            mCurrentItemPos = mCurrentItemOffset / mOnePageWidth;
+            LogUtils.d(String.format("=======onCurrentItemPos Changed======= tempPos=%s, mCurrentItemPos=%s", tempPos, mCurrentItemPos));
+        }
+    }
+
+    /**
+     * RecyclerView位移事件监听, view大小随位移事件变化
+     */
+    private void onScrolledChangedCallback() {
+        int offset = mCurrentItemOffset - mCurrentItemPos * mOnePageWidth;
+        float percent = (float) Math.max(Math.abs(offset) * 1.0 / mOnePageWidth, 0.0001);
+
+        LogUtils.d(String.format("offset=%s, percent=%s", offset, percent));
+        View leftView = null;
+        View currentView;
+        View rightView = null;
+        if (mCurrentItemPos > 0) {
+            leftView = mRecyclerView.getLayoutManager().findViewByPosition(mCurrentItemPos - 1);
+        }
+        currentView = mRecyclerView.getLayoutManager().findViewByPosition(mCurrentItemPos);
+        if (mCurrentItemPos < mRecyclerView.getAdapter().getItemCount() - 1) {
+            rightView = mRecyclerView.getLayoutManager().findViewByPosition(mCurrentItemPos + 1);
+        }
+
+        if (leftView != null) {
+            // y = (1 - mScale)x + mScale
+            leftView.setScaleY((1 - mScale) * percent + mScale);
+        }
+        if (currentView != null) {
+            // y = (mScale - 1)x + 1
+            currentView.setScaleY((mScale - 1) * percent + 1);
+        }
+        if (rightView != null) {
+            // y = (1 - mScale)x + mScale
+            rightView.setScaleY((1 - mScale) * percent + mScale);
+        }
+    }
+
+    public void setScale(float scale) {
+        mScale = scale;
+    }
+
+    public void setPagePadding(int pagePadding) {
+        mPagePadding = pagePadding;
+    }
+
+    public void setShowLeftCardWidth(int showLeftCardWidth) {
+        mShowLeftCardWidth = showLeftCardWidth;
+    }
+}

+ 147 - 0
app/src/main/java/com/kfzs/duanduan/cardview/LogUtils.java

@@ -0,0 +1,147 @@
+package com.kfzs.duanduan.cardview;
+
+import android.util.Log;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+
+/**
+ * 很好用的Log打印类,自动输出方法和行数
+ * Created by jameson on 12/19/15.
+ */
+public class LogUtils {
+
+    public static boolean mLogEnable = true;
+    public static final String PREFIX = "LogUtils--";
+
+    private static String mClassname;
+    private static ArrayList<String> mMethods;
+
+    static {
+        mClassname = LogUtils.class.getName();
+        mMethods = new ArrayList<>();
+
+        Method[] ms = LogUtils.class.getDeclaredMethods();
+        for (Method m : ms) {
+            mMethods.add(m.getName());
+        }
+    }
+
+    public static void init(boolean logEnable) {
+        mLogEnable = logEnable;
+    }
+
+    public static void d(String tag, String msg) {
+        if (mLogEnable) {
+            Log.d(tag, getMsgWithLineNumber(msg));
+        }
+    }
+
+    public static void e(String tag, String msg) {
+        if (mLogEnable) {
+            Log.e(tag, getMsgWithLineNumber(msg));
+        }
+    }
+
+    public static void i(String tag, String msg) {
+        if (mLogEnable) {
+            Log.i(tag, getMsgWithLineNumber(msg));
+        }
+    }
+
+    public static void w(String tag, String msg) {
+        if (mLogEnable) {
+            Log.w(tag, getMsgWithLineNumber(msg));
+        }
+    }
+
+    public static void v(String tag, String msg) {
+        if (mLogEnable) {
+            Log.v(tag, getMsgWithLineNumber(msg));
+        }
+    }
+
+
+    public static void d(String msg) {
+        if (mLogEnable) {
+            String[] content = getMsgAndTagWithLineNumber(msg);
+            Log.d(content[0], content[1]);
+        }
+    }
+
+    public static void e(String msg) {
+        if (mLogEnable) {
+            String[] content = getMsgAndTagWithLineNumber(msg);
+            Log.e(content[0], content[1]);
+        }
+    }
+
+    public static void i(String msg) {
+        if (mLogEnable) {
+            String[] content = getMsgAndTagWithLineNumber(msg);
+            Log.i(content[0], content[1]);
+        }
+    }
+
+    public static void i() {
+        if (mLogEnable) {
+            String[] content = getMsgAndTagWithLineNumber("");
+            Log.i(content[0], content[1]);
+        }
+    }
+
+    public static void w(String msg) {
+        if (mLogEnable) {
+            String[] content = getMsgAndTagWithLineNumber(msg);
+            Log.w(content[0], content[1]);
+        }
+    }
+
+    public static void v(String msg) {
+        if (mLogEnable) {
+            String[] content = getMsgAndTagWithLineNumber(msg);
+            Log.v(content[0], content[1]);
+        }
+    }
+
+    public static String getMsgWithLineNumber(String msg) {
+        try {
+            for (StackTraceElement st : (new Throwable()).getStackTrace()) {
+                if (mClassname.equals(st.getClassName()) || mMethods.contains(st.getMethodName())) {
+                    continue;
+                } else {
+                    int b = st.getClassName().lastIndexOf(".") + 1;
+                    String message = new StringBuilder(st.getClassName().substring(b)).append("->").append(st.getMethodName())
+                            .append("():").append(st.getLineNumber()).append(msg).toString();
+                    return message;
+                }
+
+            }
+        } catch (Exception e) {
+
+        }
+        return msg;
+    }
+
+    public static String[] getMsgAndTagWithLineNumber(String msg) {
+        try {
+            for (StackTraceElement st : (new Throwable()).getStackTrace()) {
+                if (mClassname.equals(st.getClassName()) || mMethods.contains(st.getMethodName())) {
+                    continue;
+                } else {
+                    int b = st.getClassName().lastIndexOf(".") + 1;
+                    String TAG = PREFIX + st.getClassName().substring(b);
+                    String message = st.getMethodName() + "():" + st.getLineNumber() + "->" + msg;
+                    String[] content = new String[]{TAG, message};
+                    return content;
+                }
+
+            }
+        } catch (Exception e) {
+
+        }
+        return new String[]{"universal tag", msg};
+    }
+
+
+}

+ 38 - 0
app/src/main/java/com/kfzs/duanduan/cardview/ScreenUtil.java

@@ -0,0 +1,38 @@
+package com.kfzs.duanduan.cardview;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.graphics.Point;
+import android.os.Build;
+import android.view.WindowManager;
+
+/**
+ * Created by jameson on 12/19/15.
+ */
+public class ScreenUtil {
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
+    public static int getScreenWidth(Context context) {
+        WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
+        Point p = new Point();
+        wm.getDefaultDisplay().getSize(p);
+        return p.x;
+    }
+
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
+    public static int getScreenHeight(Context context) {
+        WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
+        Point p = new Point();
+        wm.getDefaultDisplay().getSize(p);
+        return p.y;
+    }
+
+    public static int dip2px(Context context, float dpValue) {
+        final float scale = context.getResources().getDisplayMetrics().density;
+        return (int) (dpValue * scale + 0.5f);
+    }
+
+    public static int px2dip(Context context, float pxValue) {
+        final float scale = context.getResources().getDisplayMetrics().density;
+        return (int) (pxValue / scale + 0.5f);
+    }
+}

+ 44 - 0
app/src/main/java/com/kfzs/duanduan/cardview/SpeedRecyclerView.java

@@ -0,0 +1,44 @@
+package com.kfzs.duanduan.cardview;
+
+import android.content.Context;
+import android.support.annotation.Nullable;
+import android.support.v7.widget.RecyclerView;
+import android.util.AttributeSet;
+
+/**
+ * 控制fling速度的RecyclerView
+ *
+ * Created by jameson on 9/1/16.
+ */
+public class SpeedRecyclerView extends RecyclerView {
+    private static final float FLING_SCALE_DOWN_FACTOR = 0.5f; // 减速因子
+    private static final int FLING_MAX_VELOCITY = 8000; // 最大顺时滑动速度
+
+    public SpeedRecyclerView(Context context) {
+        super(context);
+    }
+
+    public SpeedRecyclerView(Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public SpeedRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @Override
+    public boolean fling(int velocityX, int velocityY) {
+        velocityX = solveVelocity(velocityX);
+        velocityY = solveVelocity(velocityY);
+        return super.fling(velocityX, velocityY);
+    }
+
+    private int solveVelocity(int velocity) {
+        if (velocity > 0) {
+            return Math.min(velocity, FLING_MAX_VELOCITY);
+        } else {
+            return Math.max(velocity, -FLING_MAX_VELOCITY);
+        }
+    }
+
+}

+ 42 - 0
app/src/main/java/com/kfzs/duanduan/cardview/ViewSwitchUtils.java

@@ -0,0 +1,42 @@
+package com.kfzs.duanduan.cardview;
+
+import android.graphics.Bitmap;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.TransitionDrawable;
+import android.widget.ImageView;
+
+/**
+ * 图片背景切换动画帮助类
+ *
+ * Created by jameson on 9/3/16.
+ */
+public class ViewSwitchUtils {
+
+    public static void startSwitchBackgroundAnim(ImageView view, Bitmap bitmap) {
+        Drawable oldDrawable = view.getDrawable();
+        Drawable oldBitmapDrawable ;
+        TransitionDrawable oldTransitionDrawable = null;
+        if (oldDrawable instanceof TransitionDrawable) {
+            oldTransitionDrawable = (TransitionDrawable) oldDrawable;
+            oldBitmapDrawable = oldTransitionDrawable.findDrawableByLayerId(oldTransitionDrawable.getId(1));
+        } else if (oldDrawable instanceof BitmapDrawable) {
+            oldBitmapDrawable = oldDrawable;
+        } else {
+            oldBitmapDrawable = new ColorDrawable(0xffc2c2c2);
+        }
+
+        if (oldTransitionDrawable == null) {
+            oldTransitionDrawable = new TransitionDrawable(new Drawable[]{oldBitmapDrawable, new BitmapDrawable(bitmap)});
+            oldTransitionDrawable.setId(0, 0);
+            oldTransitionDrawable.setId(1, 1);
+            oldTransitionDrawable.setCrossFadeEnabled(true);
+            view.setImageDrawable(oldTransitionDrawable);
+        } else {
+            oldTransitionDrawable.setDrawableByLayerId(oldTransitionDrawable.getId(0), oldBitmapDrawable);
+            oldTransitionDrawable.setDrawableByLayerId(oldTransitionDrawable.getId(1), new BitmapDrawable(bitmap));
+        }
+        oldTransitionDrawable.startTransition(1000);
+    }
+}

+ 87 - 0
app/src/main/java/com/kfzs/duanduan/cardview/ViewUtil.java

@@ -0,0 +1,87 @@
+package com.kfzs.duanduan.cardview;
+
+import android.content.Context;
+import android.graphics.Rect;
+import android.view.View;
+import android.widget.AbsListView;
+
+/**
+ * ViewUtil
+ * <p>
+ * Created by jameson on 12/19/15.
+ */
+public class ViewUtil {
+    /**
+     * 返回AbsListView scrollY
+     *
+     * @param view          view
+     * @param mHeaderHeight absListView header高度
+     * @return
+     */
+    public static int getScrollY(AbsListView view, int mHeaderHeight) {
+        if (view == null) return 0;
+
+        View c = view.getChildAt(0);
+        if (c == null) {
+            return 0;
+        }
+
+        int firstVisiblePosition = view.getFirstVisiblePosition();
+        int top = c.getTop();
+
+        int headerHeight = 0;
+        if (firstVisiblePosition >= view.getChildCount()) {
+            headerHeight = mHeaderHeight;
+        }
+
+        return -top + firstVisiblePosition * c.getHeight() + headerHeight;
+    }
+
+    /**
+     * 返回View的矩阵(减去statusBar高度)
+     *
+     * @param view view
+     * @return
+     */
+    public static Rect getOnScreenRect(View view) {
+        return getOnScreenRect(view, true);
+    }
+
+    /**
+     * 返回View的矩阵
+     *
+     * @param view            view
+     * @param removeStatusBar 是否包含算StatusBar高度
+     * @return
+     */
+    public static Rect getOnScreenRect(View view, boolean removeStatusBar) {
+        Rect rect = new Rect();
+        final int[] location = new int[2];
+        view.getLocationOnScreen(location);
+
+        int statusBarHeight = 0;
+        if (removeStatusBar) {
+            Rect windowRect = new Rect();
+            view.getWindowVisibleDisplayFrame(windowRect);
+            statusBarHeight = windowRect.top;
+        }
+
+        rect.set(location[0], location[1] - statusBarHeight, location[0] + view.getWidth(), location[1] - statusBarHeight + view.getHeight());
+        return rect;
+    }
+
+    /**
+     * 获取statusBar高度
+     *
+     * @param context context
+     * @return
+     */
+    public int getStatusBarHeight(Context context) {
+        int result = 0;
+        int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
+        if (resourceId > 0) {
+            result = context.getResources().getDimensionPixelSize(resourceId);
+        }
+        return result;
+    }
+}

+ 0 - 93
app/src/main/java/com/kfzs/duanduan/db/SearchRecordHelper.java

@@ -1,93 +0,0 @@
-package com.kfzs.duanduan.db;
-
-
-import android.content.Context;
-import android.content.SharedPreferences;
-
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-import com.kfzs.duanduan.KFZSApp;
-import com.kfzs.duanduan.bean.SearchRecordBean;
-
-import java.util.List;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  SearchRecordHelper</p>
- * @ <p>Description:搜索历史的记录保存帮助类</p>
- * @ date:  2017/8/19 9:54
- * @ QQ:    315096953
- */
-
-public class SearchRecordHelper {
-
-    private static SearchRecordHelper mSearchRecordHelper;
-    private SharedPreferences mSp;
-    private final String SEARCH_RECORD_FILE = "SEARCH_RECORD";
-    private final String SEARCH_RECORD = "SEARCH_RECORD";
-    private final int MAX_RECORDS = 6;//最大保存的记录数量
-
-
-    public static SearchRecordHelper getInstance() {
-        if (mSearchRecordHelper == null) {
-            mSearchRecordHelper = new SearchRecordHelper();
-            mSearchRecordHelper.mSp = KFZSApp.getInstance()
-                    .getSharedPreferences(mSearchRecordHelper.SEARCH_RECORD_FILE, Context.MODE_PRIVATE);
-        }
-        return mSearchRecordHelper;
-    }
-
-    /**
-     * 添加记录,会自动过滤重复,自动限制为10个最新记录
-     *
-     * @param searchRecordBean
-     * @return
-     */
-    public List<SearchRecordBean> addRecordList(SearchRecordBean searchRecordBean) {
-        List<SearchRecordBean> list = getRecordList();
-        deleteSameRecord(searchRecordBean, list);
-        if (list.size() > MAX_RECORDS - 1) {
-            list = list.subList(0, MAX_RECORDS - 1);
-        }
-        list.add(0, searchRecordBean);
-        setRecordList(list);
-        return list;
-    }
-
-    /**
-     * @param searchRecordBean
-     * @param list             会自动把这个list中的相同项删除
-     */
-    public void deleteSameRecord(SearchRecordBean searchRecordBean, List<SearchRecordBean> list) {
-        for (int i = 0; i < list.size(); i++) {
-            if (list.get(i).getKey()
-                    .equals(searchRecordBean.getKey())) {
-                list.remove(i);
-                while (list.size() > MAX_RECORDS) {
-                    list.remove(list.size() - 1);
-                }
-                setRecordList(list);
-                return;
-            }
-        }
-    }
-
-    public void clearList() {
-        mSp.edit().putString(SEARCH_RECORD, "[]").commit();
-    }
-
-    private void setRecordList(List<SearchRecordBean> list) {
-        if (list.size() > MAX_RECORDS) {
-            throw new RuntimeException("最大支持" + MAX_RECORDS + "条记录!");
-        }
-        mSp.edit().putString(SEARCH_RECORD, new Gson().toJson(list)).commit();
-    }
-
-    public List<SearchRecordBean> getRecordList() {
-        List<SearchRecordBean> list = new Gson().fromJson(mSp.getString(SEARCH_RECORD, "[]"),
-                new TypeToken<List<SearchRecordBean>>() {
-                }.getType());
-
-        return list;
-    }
-}

+ 0 - 17
app/src/main/java/com/kfzs/duanduan/event/ReStartEvent.java

@@ -1,17 +0,0 @@
-package com.kfzs.duanduan.event;
-
-/**
- * Created by Administrator on 2017/6/5.
- */
-
-public class ReStartEvent {
-    private boolean reStart;
-
-    public boolean isReStart() {
-        return reStart;
-    }
-
-    public void setReStart(boolean reStart) {
-        this.reStart = reStart;
-    }
-}

+ 0 - 75
app/src/main/java/com/kfzs/duanduan/event/UserEvent.java

@@ -1,75 +0,0 @@
-package com.kfzs.duanduan.event;
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by sinlov on 17/2/27.
- */
-public class UserEvent {
-    public static final String LOGIN_TAG = "fgt:user:login";
-    public static final String REGISTER_PHONE_TAG = "fgt:user:register:phone";
-    public static final String REGISTER_ORDINARY_TAG = "fgt:user:register:ordinary";
-    public static final String FORGET_PASSWORD_TAG = "fgt:user:register:forget:password";
-    public static final String SELF_CENTER = "fgt:user:register:SELF:CENTER";
-    public static final String SELF_INFO_SHOW = "fgt:user:register:SELF:info:show";
-    public static final String SELF_CHANGE_PASSWORD = "fgt:user:register:SELF:change:password";
-    private int skipCode;
-    private Boolean isExpandedAppBar;
-    private Boolean isExpandedAnimAppBar;
-    private Boolean isNestedScrollingAppBar;
-
-    public Boolean getIsExpandedAnimAppBar() {
-        return isExpandedAnimAppBar;
-    }
-
-    public void setIsExpandedAnimAppBar(Boolean isExpandedAnimAppBar) {
-        this.isExpandedAnimAppBar = isExpandedAnimAppBar;
-    }
-
-    public Boolean getIsNestedScrollingAppBar() {
-        return isNestedScrollingAppBar;
-    }
-
-    public void setIsNestedScrollingAppBar(Boolean isNestedScrollingAppBar) {
-        this.isNestedScrollingAppBar = isNestedScrollingAppBar;
-    }
-
-    public Boolean getIsExpandedAppBar() {
-        return isExpandedAppBar;
-    }
-
-    public void setIsExpandedAppBar(Boolean isExpandedAppBar) {
-        this.isExpandedAppBar = isExpandedAppBar;
-    }
-
-    public Integer getTitleID() {
-        return titleID;
-    }
-
-    public void setTitleID(Integer titleID) {
-        this.titleID = titleID;
-    }
-
-    private Integer titleID;
-
-
-    public int getSkipCode() {
-        return skipCode;
-    }
-
-    public void setSkipCode(int skipCode) {
-        this.skipCode = skipCode;
-    }
-}

+ 0 - 206
app/src/main/java/com/kfzs/duanduan/fragment/CategoryRankFragment.java

@@ -1,206 +0,0 @@
-package com.kfzs.duanduan.fragment;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.View;
-import android.widget.Button;
-
-import com.kfzs.appstore.utils.adapter.recyclerview.DividerItemDecoration;
-import com.kfzs.appstore.utils.restful.KFZSNetwork;
-import com.kfzs.duanduan.ActGategoryRank;
-import com.sheep.jiuyan.samllsheep.R;
-import com.kfzs.duanduan.adp.AdpFragmentRank;
-import com.kfzs.duanduan.bean.DownloadStatus;
-import com.kfzs.duanduan.bean.RecyleObj;
-import com.kfzs.duanduan.bean.RecyleType;
-import com.kfzs.duanduan.bll.UrlBll;
-import com.kfzs.duanduan.event.EventDownloadHandler;
-import com.kfzs.duanduan.proto.ApiResponseOuterClass;
-import com.kfzs.duanduan.proto.GameOuterClass;
-import com.kfzs.duanduan.utils.net.ResponseNetworkTask;
-import com.kfzs.duanduan.utils.dlg.DownBtnUtils;
-import com.kfzs.duanduan.utils.dlg.HelperUtils;
-import com.kfzs.duanduan.utils.dlg.ViewFindUtils;
-import com.kfzs.duanduan.utils.net.APIRequest;
-import com.kfzs.duanduan.utils.net.APIRequestInstance;
-import com.kfzs.duanduan.BaseCompatFragment;
-import com.kfzs.duanduan.view.FilterWindow;
-
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-
-import java.util.HashMap;
-
-
-/**
- * 分类排行榜
- * <p/>
- * Created by HooRang on 2017/2/16.
- */
-public class CategoryRankFragment extends BaseCompatFragment {
-
-    private static final String TAG = CategoryRankFragment.class.getName();
-
-    private AdpFragmentRank mAdpFragmentRank;
-
-    private RecyclerView mRecyclerView;
-    private FilterWindow mFilterWindow;
-
-    private Button mBtnTypeChoose;
-    private EventDownloadHandler.OnDownCallback mOnDownCallback;
-    private int gameType = 0;
-
-    private Activity activity;
-    @Override
-    protected void initView(Bundle savedInstanceState) {
-        activity = getActivity();
-        EventBus.getDefault().register(this);
-
-        setContentView(R.layout.fragment_game_lists_common);
-        Bundle bundle = getArguments();
-        if(bundle != null){
-            gameType = bundle.getInt(ActGategoryRank.INTENT_TYPE_ID);
-        }
-
-        mRecyclerView = ViewFindUtils.find(mContentView, R.id.recy_fgt_main_game);
-        //隐藏空空如也
-        ViewFindUtils.find(mContentView, R.id.empty_view).setVisibility(View.GONE);
-        mAdpFragmentRank = new AdpFragmentRank(activity, mRecyclerView, ClsTypeChoose);
-
-        mRecyclerView.setLayoutManager(new LinearLayoutManager(activity));
-        DividerItemDecoration decor = new DividerItemDecoration(activity, DividerItemDecoration.VERTICAL);
-        decor.setIsShowFirstItemDecoration(false);
-        decor.setSize(getResources().getDimensionPixelOffset(R.dimen.app_list_item_divider_size));
-        decor.setColor(getResources().getColor(R.color.theme_app_divider_color));
-        decor.setPaddingStart(getResources().getDimensionPixelOffset(R.dimen.app_list_item_divider_start_image));
-        decor.setPaddingEnd(getResources().getDimensionPixelOffset(R.dimen.app_list_item_divider_end));
-        mRecyclerView.addItemDecoration(decor);
-        mRecyclerView.setAdapter(mAdpFragmentRank);
-
-        //首次载入数据
-        doNetworkTask(gameType ==0?"":gameType+"");
-    }
-
-    @Override
-    public void refreshData() {
-        doNetworkTask("");
-    }
-
-
-    /**
-     * 选择分类的监听
-     */
-    private View.OnClickListener ClsTypeChoose = new View.OnClickListener() {
-        @Override
-        public void onClick(View v) {
-            mBtnTypeChoose = (Button) v;
-            showFilterPanel(mBtnTypeChoose);
-            mBtnTypeChoose.setCompoundDrawablesWithIntrinsicBounds(
-                    R.mipmap.btn_query_condition_left_ing, 0, R.mipmap.arrow_top, 0);
-        }
-    };
-
-    /**
-     * 展开分类选择板块
-     *
-     * @param anchor
-     */
-    private void showFilterPanel(View anchor) {
-        if (null == mFilterWindow) {
-            mFilterWindow = new FilterWindow(mContext, anchor, new FilterWindow.OnPopupWinListener() {
-                @Override
-                public void onReset() {
-                    doNetworkTask("");
-                }
-
-                @Override
-                public void onSubmit(String selectedIndexs) {
-                    Log.d(TAG, "selectedIndexs#" + selectedIndexs);
-                    doNetworkTask(selectedIndexs);
-                }
-
-                @Override
-                public void dismiss() {
-                    mBtnTypeChoose.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.btn_query_condition_left_ing, 0, R.mipmap.arrow_bottom, 0);
-                }
-            });
-        }
-        mFilterWindow.createWindow().show();
-    }
-
-
-    /**
-     * 加载本页数据
-     *
-     * @param selectedIndexs
-     */
-    private void doNetworkTask(final String selectedIndexs) {
-        HashMap<String, String> params = new HashMap<>();
-        params.put("page", UrlBll.AppStoreApi.PAGE_CATEGORY_RANK + "");
-        if (!TextUtils.isEmpty(selectedIndexs)) {
-            params.put("types", selectedIndexs);
-        }
-
-        APIRequest bannerRequest = APIRequestInstance.getReqUrl(TAG, UrlBll.AppStoreApi.GAME_LISTS, params, new ResponseNetworkTask() {
-            @Override
-            public void onSuccess(ApiResponseOuterClass.ApiResponse apiResponse) {
-                refreshOver();
-                mAdpFragmentRank.clear();
-//                mAdpFragmentRank.add(RecyleObj.make(RecyleType.RANK_TYPE, null));
-                mAdpFragmentRank.add(RecyleObj.make(RecyleType.RANK_TOP3, apiResponse.getGameList().getTopThreeGamesList()));
-                for (GameOuterClass.Game game : apiResponse.getGameList().getOtherGamesList()) {
-                    mAdpFragmentRank.add(RecyleObj.make(RecyleType.RANK_LIST, game));
-                }
-                mAdpFragmentRank.notifyDataSetChanged();
-            }
-
-            @Override
-            public void onFail(int code, String msg) {
-                refreshOver();
-            }
-
-        }, HelperUtils.makeErr(getString(R.string.toast_init_data_fail)));
-        KFZSNetwork.addRequest(bannerRequest);
-    }
-
-
-    /**
-     * TODO 小刁,这里感觉以后应该可以删除
-     *
-     * @param isVisibleToUser
-     */
-    @Override
-    public void setUserVisibleHint(boolean isVisibleToUser) {
-        super.setUserVisibleHint(isVisibleToUser);
-        if (!isVisibleToUser) {
-            refreshOver();
-        }
-    }
-
-    /**
-     * 把更新放到Logic里了,代码少一半以上。
-     *
-     * @param info
-     */
-    @Subscribe
-    public void onEventMainThread(DownloadStatus info) {
-        if (mOnDownCallback == null) {
-            mOnDownCallback = DownBtnUtils.installBtnStatus(mAdpFragmentRank.getmDownLoadItemLogicMgrMap());
-        }
-        EventDownloadHandler
-                .newInstance(activity, mOnDownCallback)
-                .setmTag(TAG)
-                .handlDownloadResult(info);
-    }
-
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        EventBus.getDefault().unregister(this);
-    }
-}

+ 2 - 2
app/src/main/java/com/kfzs/duanduan/fragment/FgtBorrowPlay.java

@@ -43,9 +43,9 @@
 //                boolean has_borrow = is(userRecord.getHave_access_state()) && !is(userRecord.getLoan_state());//已经借钱:借过款但是不允许借款
 //                if(unbind_phone) {
 //                } else if(userRecord == null){
-//                    SpUtils.login(SheepApp.mContext,"");
+//                    SpUtils.login(SheepApp.getInstance(),"");
 //                    ActivityManager.getInstance().finishAllActivity();
-//                    Jump2View.getInstance().goLoginView(SheepApp.mContext, "");
+//                    Jump2View.getInstance().goLoginView(SheepApp.getInstance(), "");
 //                } else if(has_borrow){
 //                    repay();
 //                } else {

+ 0 - 164
app/src/main/java/com/kfzs/duanduan/fragment/FgtFind.java

@@ -1,164 +0,0 @@
-package com.kfzs.duanduan.fragment;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.support.design.widget.TabLayout;
-import android.support.v4.view.ViewPager;
-import android.text.TextUtils;
-
-import com.kfzs.duanduan.BaseCompatFragment;
-import com.kfzs.duanduan.mine.GiftpackListAdapter;
-import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.FindTag;
-import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.util.DataUtil;
-import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.ListUtil;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import org.afinal.simplecache.ApiKey;
-
-import java.util.List;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import rx.android.schedulers.AndroidSchedulers;
-import rx.functions.Action1;
-import rx.schedulers.Schedulers;
-
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_TAG;
-
-/**
- * Created by realicing on 2018/6/27.
- * realicing@sina.com
- * 主页--发现模块
- */
-public class FgtFind extends BaseCompatFragment {
-    private Activity activity;
-
-    @Override
-    protected void initView(Bundle savedInstanceState) {
-        setContentView(R.layout.fgt_find);
-        activity = getActivity();
-        ButterKnife.bind(this, mContentView);
-        initView();
-        initData();
-    }
-
-    @BindView(R.id.indicator)
-    TabLayout indicator;
-    @BindView(R.id.pager)
-    ViewPager pager;
-
-    private int awaken_on;//1显示
-
-    private GiftpackListAdapter mAdapter;
-
-    private void initView() {
-        mAdapter = new GiftpackListAdapter(getFragmentManager(), SheepApp.getInstance());
-        mAdapter.add(FgtFindChild.newInstance(0), "全部");
-        pager.setAdapter(mAdapter);
-        indicator.setupWithViewPager(pager);
-        pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
-            @Override
-            public void onPageScrolled(int i, float v, int i1) {
-
-            }
-
-            @Override
-            public void onPageSelected(int i) {
-                position = i;
-                FIND_TAG.onEvent("find_tag_name", ListUtil.hasIndex(list, i - 1) ? list.get(i - 1).getName() : "全部");
-                pager.setCurrentItem(i);
-            }
-
-            @Override
-            public void onPageScrollStateChanged(int i) {
-
-            }
-        });
-        CommonUtil.getInstance().reflex(indicator, activity);
-
-        pager.setCurrentItem(0);
-    }
-
-    private void initData() {
-        //尝试获取缓存数据
-        List<FindTag> newList = DataUtil.getInstance().getCacheList(ApiKey.articles_tags, FindTag.class);
-        loadList(newList);
-        initNetData();
-    }
-
-    private int onResumeCount = 0;
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        if (list.isEmpty() && onResumeCount != 0)//非第一次时,并且没有数据时调用该接口
-            initNetData();
-        onResumeCount++;
-    }
-
-    private void initNetData() {
-        SheepApp.getInstance().getNetComponent().getApiService().getFindTagList()
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        if (list.isEmpty()) {//无数据时加载网络获取的新数据,否则不加载新数据
-                            List<FindTag> newList = baseMessage.getDatas(FindTag.class);
-                            loadList(newList);
-                        }
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast(baseMessage);
-                    }
-                });
-    }
-
-    //没有添加数据返回true
-    private void loadList(List<FindTag> newList) {
-        if (!ListUtil.isEmpty(newList)) {
-            list.clear();
-            ListUtil.addAll(list, newList);
-            loadMore();
-        }
-    }
-
-    private List<FindTag> list = ListUtil.emptyList();
-
-    private void loadMore() {
-
-        CommonUtil.getInstance().initUrlConfigByNet("awaken_on", new Action1<String>() {
-            @Override
-            public void call(String url) {
-                try {
-                    awaken_on = Integer.valueOf(url);
-                } catch (NumberFormatException e) {
-                    e.printStackTrace();
-                }
-
-                if (awaken_on == 1) {
-                    mAdapter.add(new FgtRouser(), "看点");
-                }
-                for (FindTag findLabel : list) {
-                    mAdapter.add(FgtFindChild.newInstance(findLabel.getId()), findLabel.getName());
-                }
-                mAdapter.notifyDataSetChanged();
-                CommonUtil.getInstance().reflex(indicator, activity);
-                pager.setCurrentItem(position);
-
-            }
-        });
-    }
-
-    private int position = 0;//默认选中第一个
-
-
-}

+ 0 - 218
app/src/main/java/com/kfzs/duanduan/fragment/FgtGameDetail.java

@@ -1,218 +0,0 @@
-package com.kfzs.duanduan.fragment;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.text.TextUtils;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.android.volleyplus.Response;
-import com.bumptech.glide.Glide;
-import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
-import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
-import com.kfzs.appstore.utils.restful.KFZSNetwork;
-import com.kfzs.duanduan.BaseCompatFragment;
-import com.kfzs.duanduan.bean.DownloadStatus;
-import com.kfzs.duanduan.bean.KFIntentKeys;
-import com.kfzs.duanduan.bll.UrlBll;
-import com.kfzs.duanduan.event.EventDownloadHandler;
-import com.kfzs.duanduan.proto.ApiResponseOuterClass;
-import com.kfzs.duanduan.proto.GameOuterClass;
-import com.kfzs.duanduan.utils.InstallButtonUtils;
-import com.kfzs.duanduan.utils.dlg.DownBtnUtils;
-import com.kfzs.duanduan.utils.dlg.HelperUtils;
-import com.kfzs.duanduan.utils.dlg.SkipUtils;
-import com.kfzs.duanduan.utils.net.APIRequest;
-import com.kfzs.duanduan.utils.net.APIRequestInstance;
-import com.kfzs.duanduan.view.KFProgressButton;
-import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  FgtGameDetail</p>
- * @ <p>Description: 商品详情页的详情页面</p>
- * @ date:  2017/6/19 13:36
- * @ QQ:    315096953
- */
-
-public class FgtGameDetail extends BaseCompatFragment {
-
-
-    private RecyclerView mRvImags;
-    private TextView mGameDesc;
-    private ImageView mGsIcon1;
-    private ImageView mGsIcon2;
-    private ImageView mGsIcon3;
-    private ImageView mGsIcon4;
-    private TextView mGsName1;
-    private TextView mGsName2;
-    private TextView mGsName3;
-    private TextView mGsName4;
-    private KFProgressButton mGsBtn1;
-    private KFProgressButton mGsBtn2;
-    private KFProgressButton mGsBtn3;
-    private KFProgressButton mGsBtn4;
-    private RecyclerViewAdapter mRecyclerViewAdapter;
-
-    private Map<String, InstallButtonUtils> mInstallButtonMgr = new HashMap<>();
-    private EventDownloadHandler.OnDownCallback mOnDownCallback;
-
-    @Override
-    public void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        EventBus.getDefault().register(this);
-    }
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        EventBus.getDefault().unregister(this);
-    }
-
-    private Activity activity;
-    @Override
-    protected void initView(Bundle savedInstanceState) {
-        activity = getActivity();
-        setContentView(R.layout.fgt_game_detail);
-        initViewById();
-        getGsGame();
-    }
-
-
-    @Subscribe
-    public void onEventMainThread(DownloadStatus info) {
-        if (mOnDownCallback == null) {
-            mOnDownCallback = DownBtnUtils.installBtnStatus(mInstallButtonMgr);
-        }
-        EventDownloadHandler.newInstance(SheepApp.getInstance(), mOnDownCallback)
-                .setmTag(TAG).handlDownloadResult(info);
-    }
-
-    /**
-     * guess the fuck games;
-     */
-    private void getGsGame() {
-        String gameId = activity.getIntent().getStringExtra(KFIntentKeys.EXTRA_GAME_ID);
-        //        http://10.8.210.223:8081/test/game/guess?game_id=125
-        String url = UrlBll.GameApi.GAME_GUESS + "game_id=" + gameId;
-
-        APIRequest gsRequest = APIRequestInstance.getReq(TAG, url, null, new Response.Listener<ApiResponseOuterClass.ApiResponse>() {
-            @Override
-            public void onResponse(ApiResponseOuterClass.ApiResponse apiResponse) {
-                List<GameOuterClass.Game> gsGamesList = apiResponse.getGamesList();
-                //try for out of index
-                try {
-                    Glide.with(FgtGameDetail.this).load(gsGamesList.get(0).getIconImage()).into(mGsIcon1);
-                    Glide.with(FgtGameDetail.this).load(gsGamesList.get(1).getIconImage()).into(mGsIcon2);
-                    Glide.with(FgtGameDetail.this).load(gsGamesList.get(2).getIconImage()).into(mGsIcon3);
-                    Glide.with(FgtGameDetail.this).load(gsGamesList.get(3).getIconImage()).into(mGsIcon4);
-                    mGsName1.setText(gsGamesList.get(0).getGameName());
-                    mGsName2.setText(gsGamesList.get(1).getGameName());
-                    mGsName3.setText(gsGamesList.get(2).getGameName());
-                    mGsName4.setText(gsGamesList.get(3).getGameName());
-                    mGsIcon1.setOnClickListener(guessYouLikeLisener);
-                    mGsIcon1.setTag(R.id.view_tag_game_icon, gsGamesList.get(0).getId());
-                    mGsIcon2.setOnClickListener(guessYouLikeLisener);
-                    mGsIcon2.setTag(R.id.view_tag_game_icon, gsGamesList.get(1).getId());
-                    mGsIcon3.setOnClickListener(guessYouLikeLisener);
-                    mGsIcon3.setTag(R.id.view_tag_game_icon, gsGamesList.get(2).getId());
-                    mGsIcon4.setOnClickListener(guessYouLikeLisener);
-                    mGsIcon4.setTag(R.id.view_tag_game_icon, gsGamesList.get(3).getId());
-
-
-                    DownBtnUtils.addDownloadBtnListener(mGsBtn1, SheepApp.getInstance(), mInstallButtonMgr, gsGamesList.get(0), "gsGame_01");
-                    DownBtnUtils.addDownloadBtnListener(mGsBtn2, SheepApp.getInstance(), mInstallButtonMgr, gsGamesList.get(1), "gsGame_02");
-                    DownBtnUtils.addDownloadBtnListener(mGsBtn3, SheepApp.getInstance(), mInstallButtonMgr, gsGamesList.get(2), "gsGame_03");
-                    DownBtnUtils.addDownloadBtnListener(mGsBtn4, SheepApp.getInstance(), mInstallButtonMgr, gsGamesList.get(3), "gsGame_04");
-
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-
-            }
-        }, HelperUtils.makeErr(getString(R.string.toast_init_data_fail)));
-
-        KFZSNetwork.addRequest(gsRequest);
-    }
-
-
-    /**
-     * 点猜你喜欢中的icon,跳游戏详情
-     */
-    private View.OnClickListener guessYouLikeLisener = new View.OnClickListener() {
-        @Override
-        public void onClick(View v) {
-            SkipUtils.getInstance().goGameDetails(activity, (int) v.getTag(R.id.view_tag_game_icon));
-        }
-    };
-
-    private void initViewById() {
-        mRvImags = mContentView.findViewById(R.id.recy_fgt_game_detail);
-        mGameDesc = mContentView.findViewById(R.id.tv_game_desc);
-        mGsIcon1 = mContentView.findViewById(R.id.img_fgt_fgt_detail_1);
-        mGsIcon2 = mContentView.findViewById(R.id.img_fgt_fgt_detail_2);
-        mGsIcon3 = mContentView.findViewById(R.id.img_fgt_fgt_detail_3);
-        mGsIcon4 = mContentView.findViewById(R.id.img_fgt_fgt_detail_4);
-        mGsName1 = mContentView.findViewById(R.id.txt_fgt_game_detail_1);
-        mGsName2 = mContentView.findViewById(R.id.txt_fgt_fgt_detail_2);
-        mGsName3 = mContentView.findViewById(R.id.txt_fgt_fgt_detail_3);
-        mGsName4 = mContentView.findViewById(R.id.txt_fgt_fgt_detail_4);
-        mGsBtn1 = mContentView.findViewById(R.id.downbtn_fgt_game_detail_1);
-        mGsBtn2 = mContentView.findViewById(R.id.downbtn_fgt_game_detail_2);
-        mGsBtn3 = mContentView.findViewById(R.id.downbtn_fgt_game_detail_3);
-        mGsBtn4 = mContentView.findViewById(R.id.downbtn_fgt_game_detail_4);
-
-        mRvImags.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance(), LinearLayoutManager.HORIZONTAL, false));
-        mRvImags.setNestedScrollingEnabled(false);
-
-    }
-
-    //设置数据;
-    public void setData(final GameOuterClass.Game game) {
-        if(game == null){
-            return;
-        }
-        String[] urls = game.getDetailImage().split("&&");
-        final ArrayList<String> urlList = new ArrayList<>();
-        Collections.addAll(urlList, urls);
-        if (mGameDesc != null)
-            mGameDesc.setText(game.getIntroduce());
-        mRecyclerViewAdapter = new RecyclerViewAdapter<String>(SheepApp.getInstance(), R.layout.item_image, urlList) {
-            @Override
-            public void convert(ViewHolder viewHolder, String url, final int position) {
-                View view = viewHolder.getView(R.id.img_detail);
-                if (view instanceof ImageView) {
-                    Glide.with(FgtGameDetail.this).load(url).into((ImageView) view);
-                    view.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View v) {
-                            if(TextUtils.isEmpty(game.getDetailImage())){
-                               return;
-                            }
-                            Jump2View.getInstance().showImgList(activity, position, urlList);
-                        }
-                    });
-                }
-
-            }
-        };
-        mRvImags.setAdapter(mRecyclerViewAdapter);
-
-
-    }
-}

+ 0 - 371
app/src/main/java/com/kfzs/duanduan/fragment/FgtMainGame.java

@@ -1,371 +0,0 @@
-package com.kfzs.duanduan.fragment;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.v4.widget.SwipeRefreshLayout;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-
-import com.android.volleyplus.Response;
-import com.arialyy.annotations.Download;
-import com.arialyy.aria.core.Aria;
-import com.arialyy.aria.core.download.DownloadTask;
-import com.kf.utils.KFLog;
-import com.kfzs.appstore.utils.restful.KFZSNetwork;
-import com.kfzs.duanduan.BaseCompatFragment;
-import com.kfzs.duanduan.services.DownloadTaskService;
-import com.kfzs.duanduan.utils.InstallButtonUtils;
-import com.kfzs.duanduan.view.KFProgressButton;
-import com.sheep.jiuyan.samllsheep.R;
-import com.kfzs.duanduan.adp.AdpMainPageRecy;
-import com.kfzs.duanduan.bean.BaseMsg;
-import com.kfzs.duanduan.bean.CateGameList;
-import com.kfzs.duanduan.bean.DownloadStatus;
-import com.kfzs.duanduan.bean.GuessYouLike;
-import com.kfzs.duanduan.bean.NewGameRecommend;
-import com.kfzs.duanduan.bean.RecyleObj;
-import com.kfzs.duanduan.bean.RecyleType;
-import com.kfzs.duanduan.bean.SpecialRecommend;
-import com.kfzs.duanduan.bll.GameListBll;
-import com.kfzs.duanduan.bll.UrlBll;
-import com.kfzs.duanduan.event.EventDownloadHandler;
-import com.kfzs.duanduan.proto.ApiResponseOuterClass;
-import com.kfzs.duanduan.proto.IndexAllbannerOuterClass;
-import com.kfzs.duanduan.proto.IndexGameOuterClass;
-import com.kfzs.duanduan.utils.dlg.DownBtnUtils;
-import com.kfzs.duanduan.utils.dlg.HelperUtils;
-import com.kfzs.duanduan.utils.net.APIRequest;
-import com.kfzs.duanduan.utils.net.APIRequestInstance;
-import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
-
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-
-import java.io.File;
-import java.util.Map;
-
-import static android.content.Intent.ACTION_PACKAGE_ADDED;
-import static android.content.Intent.ACTION_PACKAGE_REMOVED;
-
-
-/**
- * @ Created by Dlg
- * @ <p>TiTle:  FgtMainGame</p>
- * @ <p>Description: 首页Fragment的游戏一栏</p>
- * @ date:  2017/6/14 13:39
- * @ QQ:    315096953
- */
-public class FgtMainGame extends BaseCompatFragment {
-
-
-    private RecyclerView mRecyView;
-    private IndexAllbannerOuterClass.IndexAllbanner mAllBannerDatas;
-    private AdpMainPageRecy mAdpMainPageRecy;
-    private EventDownloadHandler.OnDownCallback mOnDownCallback;
-    private static final int POS_BANNER = 0;
-    private static final int POS_OWN = 1;//专属栏
-//    private static final int POS_THREE = 2;//三玩栏
-    private static final int POS_NEW_GAME_BANNER = 2;//新游预的banner
-    private static final int POS_NEW_GAME_RECOMMEND = 3;//新游推荐的列表
-    private static final int POS_GUESS_YOU_LIKE = 4;//猜你喜欢
-    private static final int POS_SPECIAL_RECOMMEND = 5;//特别推荐
-    private static final int POS_COUPON = 6;//优惠券
-    private static final int POS_RPG = 7;//角色扮演
-    private static final int POS_SUBJECT = 8;//专题
-    private static final int POS_CARTON = 9;//二次元
-    private static final int POS_BACK_TOP = 10;//返回到顶部
-    SwipeRefreshLayout mSwipeRefreshLayout;
-
-    @Override
-    protected void initView(Bundle savedInstanceState) {
-        EventBus.getDefault().register(this);
-        setContentView(R.layout.fgt_main_game);
-        mRecyView = mContentView.findViewById(R.id.recy_fgt_main_game);
-        mSwipeRefreshLayout = mContentView.findViewById(R.id.refresh);
-        mRecyView.setLayoutManager(new LinearLayoutManager(getActivity()));
-        mAdpMainPageRecy = new AdpMainPageRecy(getActivity(), mRecyView);
-        for (int i = 0; i < 12; i++) {
-            mAdpMainPageRecy.add(RecyleObj.make(RecyleType.NONE, null));
-        }
-        mRecyView.setAdapter(mAdpMainPageRecy);
-        loadDatas();
-
-        mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
-            @Override
-            public void onRefresh() {
-                refreshData();
-                mSwipeRefreshLayout.setRefreshing(false);
-            }
-        });
-        Aria.download(this).register();
-
-    }
-
-    @Override
-    public void refreshData() {
-        loadDatas();
-    }
-
-
-    /**
-     * 加载本fragment数据
-     */
-    private void loadDatas() {
-        APIRequest bannerRequest = APIRequestInstance.getReq(TAG, UrlBll.AppStoreApi.BANNER, null, new Response.Listener<ApiResponseOuterClass.ApiResponse>() {
-
-
-            @Override
-            public void onResponse(ApiResponseOuterClass.ApiResponse apiResponse) {
-
-                int code = apiResponse.getCodeValue();
-                switch (code) {
-                    case ApiResponseOuterClass.Codes.Success_VALUE:
-                        mAllBannerDatas = apiResponse.getIndexAllbanner();
-                        loadGameLists();
-                        break;
-                    default:
-                        KFLog.e("首页Banner加载失败#" + code);
-                        refreshOver();
-                        break;
-                }
-
-            }
-        }, HelperUtils.makeErr("获取banner数据报错"));
-        KFZSNetwork.addRequest(bannerRequest);
-
-        GameListBll gameListBll = new GameListBll();
-        //加载新游推荐列表
-        gameListBll.getNewGameRecommendList(null, 10, new Response.Listener<BaseMsg>() {
-            @Override
-            public void onResponse(BaseMsg baseMsg) {
-                if (baseMsg.getDatas(NewGameRecommend.class) == null
-                        || baseMsg.getDatas(NewGameRecommend.class).size() < 1) {
-                    return;
-                }
-                mAdpMainPageRecy.add(RecyleObj.make(RecyleType.NEW_GAME_RECOMMEND,
-                        baseMsg.getDatas(NewGameRecommend.class)), POS_NEW_GAME_RECOMMEND);
-                mAdpMainPageRecy.notifyItemChanged(POS_NEW_GAME_RECOMMEND);
-            }
-        });
-
-        //加载猜你喜欢一栏
-
-        gameListBll.getGuessYouLike(new Response.Listener<BaseMsg>() {
-            @Override
-            public void onResponse(BaseMsg baseMsg) {
-                if (baseMsg.getData(GuessYouLike.class) == null) {
-                    return;
-                }
-                mAdpMainPageRecy.add(RecyleObj.make(RecyleType.GUESS_YOU_LIKE,
-                        baseMsg.getData(GuessYouLike.class)), POS_GUESS_YOU_LIKE);
-                //TODO 暂时原因不明,如果局部加载,始终会第一次加载不出来。。。
-//                mAdpMainPageRecy.notifyItemChanged(POS_GUESS_YOU_LIKE);
-                mAdpMainPageRecy.notifyDataSetChanged();
-            }
-        });
-
-        //加载特别推荐
-        gameListBll.getSpecialRecommend(new Response.Listener<BaseMsg>() {
-            @Override
-            public void onResponse(BaseMsg baseMsg) {
-                if (baseMsg.getData(SpecialRecommend.class) == null) {
-                    return;
-                }
-                mAdpMainPageRecy.add(RecyleObj.make(RecyleType.SPECIAL_GAME_RECOMMEND,
-                        baseMsg.getData(SpecialRecommend.class)), POS_SPECIAL_RECOMMEND);
-                mAdpMainPageRecy.notifyItemChanged(POS_SPECIAL_RECOMMEND);
-            }
-        });
-
-        //加载专题二次元和角色扮演
-        gameListBll.getCartonRPGEtc(new Response.Listener<BaseMsg>() {
-            @Override
-            public void onResponse(BaseMsg baseMsg) {
-                CateGameList gameList = baseMsg.getData(CateGameList.class);
-                if (gameList == null) {
-                    return;
-                }
-                if (gameList.getCommon() != null && gameList.getCommon().size() > 0) {
-                    mAdpMainPageRecy.add(RecyleObj.make(RecyleType.RPG,
-                            gameList.getCommon().get(0)), POS_RPG);
-                }
-                if (gameList.getCommon() != null && gameList.getCommon().size() > 1) {
-                    mAdpMainPageRecy.add(RecyleObj.make(RecyleType.CARTON,
-                            gameList.getCommon().get(1)), POS_CARTON);
-                }
-                if (gameList.getSubject() != null
-                        && gameList.getSubject().getGames().size() > 0) {
-                    mAdpMainPageRecy.add(RecyleObj.make(RecyleType.SUBJECT,
-                            gameList.getSubject()), POS_SUBJECT);
-                }
-                mAdpMainPageRecy.notifyItemChanged(POS_SUBJECT);
-            }
-        });
-
-    }
-
-
-    /**
-     * 加载游戏列表
-     */
-    private void loadGameLists() {
-        try {
-            APIRequest bannerRequest = APIRequestInstance.getReq(TAG, UrlBll.AppStoreApi.RECOMMEND_GAME_GROUPS, null, new Response.Listener<ApiResponseOuterClass.ApiResponse>() {
-
-                @Override
-                public void onResponse(ApiResponseOuterClass.ApiResponse apiResponse) {
-                    int code = apiResponse.getCodeValue();
-                    switch (code) {
-                        case ApiResponseOuterClass.Codes.Success_VALUE:
-                            IndexGameOuterClass.IndexGame indexGame = apiResponse.getIndexGame();
-                            loadViews(indexGame);
-                            break;
-                        default:
-                            break;
-                    }
-                    refreshOver();
-
-                }
-            }, HelperUtils.makeErr("接口 v1/index_game 报错"));
-            KFZSNetwork.addRequest(bannerRequest);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-    }
-
-
-    /**
-     * 加载视图,以前是一个接口就有了recyview的所有值,所以用了dataObj
-     * 现改为多个接口,所以值就在adp里再去分别获取吧,dataObj不用了。
-     *
-     * @param indexGame
-     */
-    private void loadViews(IndexGameOuterClass.IndexGame indexGame) {
-
-        if (mAllBannerDatas.getShufflingList() != null &&
-                !mAllBannerDatas.getShufflingList().isEmpty()) {
-            mAdpMainPageRecy.add(RecyleObj.make(RecyleType.BANNER,
-                    mAllBannerDatas.getShufflingList()), POS_BANNER);
-        }
-//        mAdpMainPageRecy.add(RecyleObj.make(RecyleType.OWN_ZONE, null), POS_OWN);//VIP专区
-//        mAdpMainPageRecy.add(RecyleObj.make(RecyleType.THREE_PLAY, null), POS_THREE);
-        mAdpMainPageRecy.add(RecyleObj.make(RecyleType.BACK_TOP, null), POS_BACK_TOP);
-
-        System.gc();
-        mAdpMainPageRecy.notifyDataSetChanged();
-    }
-
-    /**
-     * 把更新放到Logic里了,代码少一半以上。
-     *
-     * @param info
-     */
-    @Subscribe
-    public void onEventMainThread(DownloadStatus info) {
-        if (mOnDownCallback == null) {
-            mOnDownCallback = DownBtnUtils.installBtnStatus(mAdpMainPageRecy.getmDownLoadItemLogicMgrMap());
-        }
-        EventDownloadHandler
-                .newInstance(getActivity(), mOnDownCallback)
-                .setmTag(TAG)
-                .handlDownloadResult(info);
-    }
-//        if(Intent.ACTION_PACKAGE_ADDED.equals(intent.getAction()) || Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction()) || Intent.ACTION_PACKAGE_REPLACED.equals(intent.getAction())){
-    @Subscribe
-    public void onEventMainThread(Intent intent) {
-        if(intent != null && intent.getAction() != null && intent.getDataString() != null && intent.getDataString().contains("package:")){
-            String packageName = intent.getDataString().replace("package:","");
-            for (Map.Entry<String, InstallButtonUtils> entry : mAdpMainPageRecy.getmDownLoadItemLogicMgrMap().entrySet()) {
-                if(packageName.equals(entry.getValue().getPackageName())){
-                    switch (intent.getAction()){
-                        case ACTION_PACKAGE_ADDED:
-                            entry.getValue().setStatus(KFProgressButton.STATUS.STATUS_FINISH);
-                            return;
-                        case ACTION_PACKAGE_REMOVED:
-                            if(new File(ClassFileHelper.getFilePathByPackageName(packageName)).exists()) {
-                                entry.getValue().setStatus(KFProgressButton.STATUS.STATUS_FINISH);
-                            } else {
-                                entry.getValue().setStatus(KFProgressButton.STATUS.STATUS_INIT);
-                            }
-                            return;
-                    }
-                }
-            }
-        }
-    }
-
-
-    @Download.onPre void onPre(DownloadTask task) {
-        DownloadStatus downloadStatus = new DownloadStatus();
-        downloadStatus.setStatus(DownloadTaskService.STATUS_INIT);
-        downloadStatus.setApkPath(task.getDownloadPath());
-        downloadStatus.setDownloadUrl(task.getKey());
-        onEventMainThread(downloadStatus);
-    }
-    @Download.onTaskStart void taskStart(DownloadTask task) {
-        DownloadStatus downloadStatus = new DownloadStatus();
-        downloadStatus.setStatus(DownloadTaskService.STATUS_ING);
-        downloadStatus.setApkPath(task.getDownloadPath());
-        downloadStatus.setDownloadUrl(task.getKey());
-        onEventMainThread(downloadStatus);
-    }
-    @Download.onTaskResume void taskResume(DownloadTask task) {
-        DownloadStatus downloadStatus = new DownloadStatus();
-        downloadStatus.setStatus(DownloadTaskService.STATUS_ING);
-        downloadStatus.setApkPath(task.getDownloadPath());
-        downloadStatus.setDownloadUrl(task.getKey());
-        onEventMainThread(downloadStatus);
-    }
-    //在这里处理任务执行中的状态,如进度进度条的刷新
-    @Download.onTaskRunning protected void running(DownloadTask task) {
-        DownloadStatus downloadStatus = new DownloadStatus();
-        downloadStatus.setStatus(DownloadTaskService.STATUS_ING);
-        downloadStatus.setApkPath(task.getDownloadPath());
-        downloadStatus.setDownloadUrl(task.getKey());
-        onEventMainThread(downloadStatus);
-    }
-
-    @Download.onTaskStop void taskStop(DownloadTask task) {
-        DownloadStatus downloadStatus = new DownloadStatus();
-        downloadStatus.setStatus(DownloadTaskService.STATUS_PAUSE);
-        downloadStatus.setApkPath(task.getDownloadPath());
-        downloadStatus.setDownloadUrl(task.getKey());
-        onEventMainThread(downloadStatus);
-    }
-
-    @Download.onNoSupportBreakPoint void onNoSupportBreakPoint(DownloadTask task) {
-    }
-
-    @Download.onTaskCancel void taskCancel(DownloadTask task) {
-        DownloadStatus downloadStatus = new DownloadStatus();
-        downloadStatus.setStatus(DownloadTaskService.STATUS_DELETE);
-        downloadStatus.setApkPath(task.getDownloadPath());
-        downloadStatus.setDownloadUrl(task.getKey());
-        onEventMainThread(downloadStatus);
-    }
-
-    @Download.onTaskFail void taskFail(DownloadTask task) {
-        DownloadStatus downloadStatus = new DownloadStatus();
-        downloadStatus.setStatus(DownloadTaskService.STATUS_FAIL);
-        downloadStatus.setApkPath(task.getDownloadPath());
-        downloadStatus.setDownloadUrl(task.getKey());
-        onEventMainThread(downloadStatus);
-    }
-
-    @Download.onTaskComplete void taskComplete(DownloadTask task) {
-        DownloadStatus downloadStatus = new DownloadStatus();
-        downloadStatus.setStatus(DownloadTaskService.STATUS_FINISH);
-        downloadStatus.setApkPath(task.getDownloadPath());
-        downloadStatus.setDownloadUrl(task.getKey());
-        onEventMainThread(downloadStatus);
-    }
-
-
-    @Override
-    public void setUserVisibleHint(boolean isVisibleToUser) {
-        super.setUserVisibleHint(isVisibleToUser);
-        if (!isVisibleToUser) {
-            refreshOver();
-        }
-    }
-}

+ 0 - 82
app/src/main/java/com/kfzs/duanduan/mine/ShenheAdapter.java

@@ -1,82 +0,0 @@
-package com.kfzs.duanduan.mine;
-
-import android.content.Context;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentPagerAdapter;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.sheep.gamegroup.view.fragment.FgtAudit;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * created on:2018/8/22 on 4:57
- * created by: Administrator
- * 描述:
- */
-public class ShenheAdapter extends FragmentPagerAdapter {
-    private Context mContext;
-    private List<Object> mListFragment = new ArrayList<>();
-    private List<Object> mTitles = new ArrayList<>();
-
-    public ShenheAdapter(FragmentManager fm, Context mContext) {
-        super(fm);
-        this.mContext = mContext;
-    }
-
-    public void add(Fragment fragment, String title) {
-        mListFragment.add(fragment);
-        mTitles.add(title);
-    }
-
-    @Override
-    public Fragment getItem(int position) {
-        return (Fragment) mListFragment.get(position);
-    }
-
-    @Override
-    public int getCount() {
-        return mListFragment.size();
-    }
-
-    @Override
-    public int getItemPosition(Object object) {
-        return super.getItemPosition(object);
-    }
-
-    @Override
-    public CharSequence getPageTitle(int position) {
-        return (CharSequence) mTitles.get(position);
-    }
-
-    public View getTabView(int position) {
-        View v = LayoutInflater.from(mContext).inflate(R.layout.view_add_fgtmainaudit, null);
-        ImageView imageView = v.findViewById(R.id.iv_img);
-        TextView textView1 = v.findViewById(R.id.tv_text);
-        if (position == 0) {
-            textView1.setText("审核中");
-        } else if (position == 1) {
-            textView1.setText("审核成功");
-        } else if (position == 2) {
-            textView1.setText("审核失败");
-            if (FgtAudit.newInstance(3).type == 3) {
-                if (FgtAudit.newInstance(3).etyList != null) {
-                    if (FgtAudit.newInstance(3).etyList.get(0).getStatus() == 6) {
-                        imageView.setVisibility(View.VISIBLE);
-                    } else {
-                        imageView.setVisibility(View.GONE);
-                    }
-                }
-            }
-        }
-
-        return v;
-    }
-}

+ 0 - 951
app/src/main/java/com/kfzs/duanduan/proto/AdviceOuterClass.java

@@ -1,951 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: advice.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class AdviceOuterClass {
-  private AdviceOuterClass() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface AdviceOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.Advice)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>int32 Id = 1;</code>
-     */
-    int getId();
-
-    /**
-     * <code>int32 UserId = 2;</code>
-     */
-    int getUserId();
-
-    /**
-     * <code>string ContactWay = 3;</code>
-     */
-    java.lang.String getContactWay();
-    /**
-     * <code>string ContactWay = 3;</code>
-     */
-    com.google.protobuf.ByteString
-        getContactWayBytes();
-
-    /**
-     * <code>int32 Type = 4;</code>
-     */
-    int getType();
-
-    /**
-     * <code>string AdviceContent = 5;</code>
-     */
-    java.lang.String getAdviceContent();
-    /**
-     * <code>string AdviceContent = 5;</code>
-     */
-    com.google.protobuf.ByteString
-        getAdviceContentBytes();
-
-    /**
-     * <code>int64 CreatedTime = 6;</code>
-     */
-    long getCreatedTime();
-  }
-  /**
-   * Protobuf type {@code protobuf.Advice}
-   */
-  public  static final class Advice extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.Advice)
-      AdviceOrBuilder {
-    // Use Advice.newBuilder() to construct.
-    private Advice(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private Advice() {
-      id_ = 0;
-      userId_ = 0;
-      contactWay_ = "";
-      type_ = 0;
-      adviceContent_ = "";
-      createdTime_ = 0L;
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private Advice(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 8: {
-
-              id_ = input.readInt32();
-              break;
-            }
-            case 16: {
-
-              userId_ = input.readInt32();
-              break;
-            }
-            case 26: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              contactWay_ = s;
-              break;
-            }
-            case 32: {
-
-              type_ = input.readInt32();
-              break;
-            }
-            case 42: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              adviceContent_ = s;
-              break;
-            }
-            case 48: {
-
-              createdTime_ = input.readInt64();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.kfzs.duanduan.proto.AdviceOuterClass.internal_static_protobuf_Advice_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return com.kfzs.duanduan.proto.AdviceOuterClass.internal_static_protobuf_Advice_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              com.kfzs.duanduan.proto.AdviceOuterClass.Advice.class, com.kfzs.duanduan.proto.AdviceOuterClass.Advice.Builder.class);
-    }
-
-    public static final int ID_FIELD_NUMBER = 1;
-    private int id_;
-    /**
-     * <code>int32 Id = 1;</code>
-     */
-    public int getId() {
-      return id_;
-    }
-
-    public static final int USERID_FIELD_NUMBER = 2;
-    private int userId_;
-    /**
-     * <code>int32 UserId = 2;</code>
-     */
-    public int getUserId() {
-      return userId_;
-    }
-
-    public static final int CONTACTWAY_FIELD_NUMBER = 3;
-    private volatile java.lang.Object contactWay_;
-    /**
-     * <code>string ContactWay = 3;</code>
-     */
-    public java.lang.String getContactWay() {
-      java.lang.Object ref = contactWay_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        contactWay_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string ContactWay = 3;</code>
-     */
-    public com.google.protobuf.ByteString
-        getContactWayBytes() {
-      java.lang.Object ref = contactWay_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        contactWay_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    public static final int TYPE_FIELD_NUMBER = 4;
-    private int type_;
-    /**
-     * <code>int32 Type = 4;</code>
-     */
-    public int getType() {
-      return type_;
-    }
-
-    public static final int ADVICECONTENT_FIELD_NUMBER = 5;
-    private volatile java.lang.Object adviceContent_;
-    /**
-     * <code>string AdviceContent = 5;</code>
-     */
-    public java.lang.String getAdviceContent() {
-      java.lang.Object ref = adviceContent_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        adviceContent_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string AdviceContent = 5;</code>
-     */
-    public com.google.protobuf.ByteString
-        getAdviceContentBytes() {
-      java.lang.Object ref = adviceContent_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        adviceContent_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    public static final int CREATEDTIME_FIELD_NUMBER = 6;
-    private long createdTime_;
-    /**
-     * <code>int64 CreatedTime = 6;</code>
-     */
-    public long getCreatedTime() {
-      return createdTime_;
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (id_ != 0) {
-        output.writeInt32(1, id_);
-      }
-      if (userId_ != 0) {
-        output.writeInt32(2, userId_);
-      }
-      if (!getContactWayBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, contactWay_);
-      }
-      if (type_ != 0) {
-        output.writeInt32(4, type_);
-      }
-      if (!getAdviceContentBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, adviceContent_);
-      }
-      if (createdTime_ != 0L) {
-        output.writeInt64(6, createdTime_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (id_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(1, id_);
-      }
-      if (userId_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(2, userId_);
-      }
-      if (!getContactWayBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, contactWay_);
-      }
-      if (type_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(4, type_);
-      }
-      if (!getAdviceContentBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, adviceContent_);
-      }
-      if (createdTime_ != 0L) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt64Size(6, createdTime_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof com.kfzs.duanduan.proto.AdviceOuterClass.Advice)) {
-        return super.equals(obj);
-      }
-      com.kfzs.duanduan.proto.AdviceOuterClass.Advice other = (com.kfzs.duanduan.proto.AdviceOuterClass.Advice) obj;
-
-      boolean result = true;
-      result = result && (getId()
-          == other.getId());
-      result = result && (getUserId()
-          == other.getUserId());
-      result = result && getContactWay()
-          .equals(other.getContactWay());
-      result = result && (getType()
-          == other.getType());
-      result = result && getAdviceContent()
-          .equals(other.getAdviceContent());
-      result = result && (getCreatedTime()
-          == other.getCreatedTime());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + ID_FIELD_NUMBER;
-      hash = (53 * hash) + getId();
-      hash = (37 * hash) + USERID_FIELD_NUMBER;
-      hash = (53 * hash) + getUserId();
-      hash = (37 * hash) + CONTACTWAY_FIELD_NUMBER;
-      hash = (53 * hash) + getContactWay().hashCode();
-      hash = (37 * hash) + TYPE_FIELD_NUMBER;
-      hash = (53 * hash) + getType();
-      hash = (37 * hash) + ADVICECONTENT_FIELD_NUMBER;
-      hash = (53 * hash) + getAdviceContent().hashCode();
-      hash = (37 * hash) + CREATEDTIME_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
-          getCreatedTime());
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(com.kfzs.duanduan.proto.AdviceOuterClass.Advice prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * Protobuf type {@code protobuf.Advice}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.Advice)
-        com.kfzs.duanduan.proto.AdviceOuterClass.AdviceOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return com.kfzs.duanduan.proto.AdviceOuterClass.internal_static_protobuf_Advice_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return com.kfzs.duanduan.proto.AdviceOuterClass.internal_static_protobuf_Advice_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                com.kfzs.duanduan.proto.AdviceOuterClass.Advice.class, com.kfzs.duanduan.proto.AdviceOuterClass.Advice.Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.AdviceOuterClass.Advice.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        id_ = 0;
-
-        userId_ = 0;
-
-        contactWay_ = "";
-
-        type_ = 0;
-
-        adviceContent_ = "";
-
-        createdTime_ = 0L;
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return com.kfzs.duanduan.proto.AdviceOuterClass.internal_static_protobuf_Advice_descriptor;
-      }
-
-      public com.kfzs.duanduan.proto.AdviceOuterClass.Advice getDefaultInstanceForType() {
-        return com.kfzs.duanduan.proto.AdviceOuterClass.Advice.getDefaultInstance();
-      }
-
-      public com.kfzs.duanduan.proto.AdviceOuterClass.Advice build() {
-        com.kfzs.duanduan.proto.AdviceOuterClass.Advice result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public com.kfzs.duanduan.proto.AdviceOuterClass.Advice buildPartial() {
-        com.kfzs.duanduan.proto.AdviceOuterClass.Advice result = new com.kfzs.duanduan.proto.AdviceOuterClass.Advice(this);
-        result.id_ = id_;
-        result.userId_ = userId_;
-        result.contactWay_ = contactWay_;
-        result.type_ = type_;
-        result.adviceContent_ = adviceContent_;
-        result.createdTime_ = createdTime_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof com.kfzs.duanduan.proto.AdviceOuterClass.Advice) {
-          return mergeFrom((com.kfzs.duanduan.proto.AdviceOuterClass.Advice)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(com.kfzs.duanduan.proto.AdviceOuterClass.Advice other) {
-        if (other == com.kfzs.duanduan.proto.AdviceOuterClass.Advice.getDefaultInstance()) return this;
-        if (other.getId() != 0) {
-          setId(other.getId());
-        }
-        if (other.getUserId() != 0) {
-          setUserId(other.getUserId());
-        }
-        if (!other.getContactWay().isEmpty()) {
-          contactWay_ = other.contactWay_;
-          onChanged();
-        }
-        if (other.getType() != 0) {
-          setType(other.getType());
-        }
-        if (!other.getAdviceContent().isEmpty()) {
-          adviceContent_ = other.adviceContent_;
-          onChanged();
-        }
-        if (other.getCreatedTime() != 0L) {
-          setCreatedTime(other.getCreatedTime());
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        com.kfzs.duanduan.proto.AdviceOuterClass.Advice parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.kfzs.duanduan.proto.AdviceOuterClass.Advice) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private int id_ ;
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public int getId() {
-        return id_;
-      }
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public Builder setId(int value) {
-        
-        id_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public Builder clearId() {
-        
-        id_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private int userId_ ;
-      /**
-       * <code>int32 UserId = 2;</code>
-       */
-      public int getUserId() {
-        return userId_;
-      }
-      /**
-       * <code>int32 UserId = 2;</code>
-       */
-      public Builder setUserId(int value) {
-        
-        userId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 UserId = 2;</code>
-       */
-      public Builder clearUserId() {
-        
-        userId_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private java.lang.Object contactWay_ = "";
-      /**
-       * <code>string ContactWay = 3;</code>
-       */
-      public java.lang.String getContactWay() {
-        java.lang.Object ref = contactWay_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          contactWay_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * <code>string ContactWay = 3;</code>
-       */
-      public com.google.protobuf.ByteString
-          getContactWayBytes() {
-        java.lang.Object ref = contactWay_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          contactWay_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string ContactWay = 3;</code>
-       */
-      public Builder setContactWay(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        contactWay_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string ContactWay = 3;</code>
-       */
-      public Builder clearContactWay() {
-        
-        contactWay_ = getDefaultInstance().getContactWay();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string ContactWay = 3;</code>
-       */
-      public Builder setContactWayBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        contactWay_ = value;
-        onChanged();
-        return this;
-      }
-
-      private int type_ ;
-      /**
-       * <code>int32 Type = 4;</code>
-       */
-      public int getType() {
-        return type_;
-      }
-      /**
-       * <code>int32 Type = 4;</code>
-       */
-      public Builder setType(int value) {
-        
-        type_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 Type = 4;</code>
-       */
-      public Builder clearType() {
-        
-        type_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private java.lang.Object adviceContent_ = "";
-      /**
-       * <code>string AdviceContent = 5;</code>
-       */
-      public java.lang.String getAdviceContent() {
-        java.lang.Object ref = adviceContent_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          adviceContent_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * <code>string AdviceContent = 5;</code>
-       */
-      public com.google.protobuf.ByteString
-          getAdviceContentBytes() {
-        java.lang.Object ref = adviceContent_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          adviceContent_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string AdviceContent = 5;</code>
-       */
-      public Builder setAdviceContent(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        adviceContent_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string AdviceContent = 5;</code>
-       */
-      public Builder clearAdviceContent() {
-        
-        adviceContent_ = getDefaultInstance().getAdviceContent();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string AdviceContent = 5;</code>
-       */
-      public Builder setAdviceContentBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        adviceContent_ = value;
-        onChanged();
-        return this;
-      }
-
-      private long createdTime_ ;
-      /**
-       * <code>int64 CreatedTime = 6;</code>
-       */
-      public long getCreatedTime() {
-        return createdTime_;
-      }
-      /**
-       * <code>int64 CreatedTime = 6;</code>
-       */
-      public Builder setCreatedTime(long value) {
-        
-        createdTime_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int64 CreatedTime = 6;</code>
-       */
-      public Builder clearCreatedTime() {
-        
-        createdTime_ = 0L;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.Advice)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.Advice)
-    private static final com.kfzs.duanduan.proto.AdviceOuterClass.Advice DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new com.kfzs.duanduan.proto.AdviceOuterClass.Advice();
-    }
-
-    public static com.kfzs.duanduan.proto.AdviceOuterClass.Advice getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<Advice>
-        PARSER = new com.google.protobuf.AbstractParser<Advice>() {
-      public Advice parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new Advice(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<Advice> parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<Advice> getParserForType() {
-      return PARSER;
-    }
-
-    public com.kfzs.duanduan.proto.AdviceOuterClass.Advice getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_Advice_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_Advice_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\014advice.proto\022\010protobuf\"r\n\006Advice\022\n\n\002Id" +
-      "\030\001 \001(\005\022\016\n\006UserId\030\002 \001(\005\022\022\n\nContactWay\030\003 \001" +
-      "(\t\022\014\n\004Type\030\004 \001(\005\022\025\n\rAdviceContent\030\005 \001(\t\022" +
-      "\023\n\013CreatedTime\030\006 \001(\003B\031\n\027com.kfzs.duandua" +
-      "n.protob\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_Advice_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_Advice_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_Advice_descriptor,
-        new java.lang.String[] { "Id", "UserId", "ContactWay", "Type", "AdviceContent", "CreatedTime", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

文件差异内容过多而无法显示
+ 0 - 1314
app/src/main/java/com/kfzs/duanduan/proto/ApiPublic.java


文件差异内容过多而无法显示
+ 0 - 8991
app/src/main/java/com/kfzs/duanduan/proto/ApiRequestOuterClass.java


文件差异内容过多而无法显示
+ 0 - 17374
app/src/main/java/com/kfzs/duanduan/proto/ApiResponseOuterClass.java


+ 0 - 559
app/src/main/java/com/kfzs/duanduan/proto/Captcha.java

@@ -1,559 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: captcha.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class Captcha {
-  private Captcha() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface CaptchaOutOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.CaptchaOut)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>string key = 1;</code>
-     */
-    java.lang.String getKey();
-    /**
-     * <code>string key = 1;</code>
-     */
-    com.google.protobuf.ByteString
-        getKeyBytes();
-  }
-  /**
-   * Protobuf type {@code protobuf.CaptchaOut}
-   */
-  public  static final class CaptchaOut extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.CaptchaOut)
-      CaptchaOutOrBuilder {
-    // Use CaptchaOut.newBuilder() to construct.
-    private CaptchaOut(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private CaptchaOut() {
-      key_ = "";
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private CaptchaOut(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              key_ = s;
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.kfzs.duanduan.proto.Captcha.internal_static_protobuf_CaptchaOut_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return com.kfzs.duanduan.proto.Captcha.internal_static_protobuf_CaptchaOut_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              com.kfzs.duanduan.proto.Captcha.CaptchaOut.class, com.kfzs.duanduan.proto.Captcha.CaptchaOut.Builder.class);
-    }
-
-    public static final int KEY_FIELD_NUMBER = 1;
-    private volatile java.lang.Object key_;
-    /**
-     * <code>string key = 1;</code>
-     */
-    public java.lang.String getKey() {
-      java.lang.Object ref = key_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        key_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string key = 1;</code>
-     */
-    public com.google.protobuf.ByteString
-        getKeyBytes() {
-      java.lang.Object ref = key_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        key_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (!getKeyBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (!getKeyBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof com.kfzs.duanduan.proto.Captcha.CaptchaOut)) {
-        return super.equals(obj);
-      }
-      com.kfzs.duanduan.proto.Captcha.CaptchaOut other = (com.kfzs.duanduan.proto.Captcha.CaptchaOut) obj;
-
-      boolean result = true;
-      result = result && getKey()
-          .equals(other.getKey());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + KEY_FIELD_NUMBER;
-      hash = (53 * hash) + getKey().hashCode();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(com.kfzs.duanduan.proto.Captcha.CaptchaOut prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * Protobuf type {@code protobuf.CaptchaOut}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.CaptchaOut)
-        com.kfzs.duanduan.proto.Captcha.CaptchaOutOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return com.kfzs.duanduan.proto.Captcha.internal_static_protobuf_CaptchaOut_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return com.kfzs.duanduan.proto.Captcha.internal_static_protobuf_CaptchaOut_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                com.kfzs.duanduan.proto.Captcha.CaptchaOut.class, com.kfzs.duanduan.proto.Captcha.CaptchaOut.Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.Captcha.CaptchaOut.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        key_ = "";
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return com.kfzs.duanduan.proto.Captcha.internal_static_protobuf_CaptchaOut_descriptor;
-      }
-
-      public com.kfzs.duanduan.proto.Captcha.CaptchaOut getDefaultInstanceForType() {
-        return com.kfzs.duanduan.proto.Captcha.CaptchaOut.getDefaultInstance();
-      }
-
-      public com.kfzs.duanduan.proto.Captcha.CaptchaOut build() {
-        com.kfzs.duanduan.proto.Captcha.CaptchaOut result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public com.kfzs.duanduan.proto.Captcha.CaptchaOut buildPartial() {
-        com.kfzs.duanduan.proto.Captcha.CaptchaOut result = new com.kfzs.duanduan.proto.Captcha.CaptchaOut(this);
-        result.key_ = key_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof com.kfzs.duanduan.proto.Captcha.CaptchaOut) {
-          return mergeFrom((com.kfzs.duanduan.proto.Captcha.CaptchaOut)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(com.kfzs.duanduan.proto.Captcha.CaptchaOut other) {
-        if (other == com.kfzs.duanduan.proto.Captcha.CaptchaOut.getDefaultInstance()) return this;
-        if (!other.getKey().isEmpty()) {
-          key_ = other.key_;
-          onChanged();
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        com.kfzs.duanduan.proto.Captcha.CaptchaOut parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.kfzs.duanduan.proto.Captcha.CaptchaOut) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private java.lang.Object key_ = "";
-      /**
-       * <code>string key = 1;</code>
-       */
-      public java.lang.String getKey() {
-        java.lang.Object ref = key_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          key_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * <code>string key = 1;</code>
-       */
-      public com.google.protobuf.ByteString
-          getKeyBytes() {
-        java.lang.Object ref = key_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          key_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string key = 1;</code>
-       */
-      public Builder setKey(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        key_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string key = 1;</code>
-       */
-      public Builder clearKey() {
-        
-        key_ = getDefaultInstance().getKey();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string key = 1;</code>
-       */
-      public Builder setKeyBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        key_ = value;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.CaptchaOut)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.CaptchaOut)
-    private static final com.kfzs.duanduan.proto.Captcha.CaptchaOut DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new com.kfzs.duanduan.proto.Captcha.CaptchaOut();
-    }
-
-    public static com.kfzs.duanduan.proto.Captcha.CaptchaOut getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<CaptchaOut>
-        PARSER = new com.google.protobuf.AbstractParser<CaptchaOut>() {
-      public CaptchaOut parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new CaptchaOut(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<CaptchaOut> parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<CaptchaOut> getParserForType() {
-      return PARSER;
-    }
-
-    public com.kfzs.duanduan.proto.Captcha.CaptchaOut getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_CaptchaOut_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_CaptchaOut_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\rcaptcha.proto\022\010protobuf\"\031\n\nCaptchaOut\022" +
-      "\013\n\003key\030\001 \001(\tB\031\n\027com.kfzs.duanduan.protob" +
-      "\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_CaptchaOut_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_CaptchaOut_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_CaptchaOut_descriptor,
-        new java.lang.String[] { "Key", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

+ 0 - 761
app/src/main/java/com/kfzs/duanduan/proto/CouponCodeOuterClass.java

@@ -1,761 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: coupon_code.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class CouponCodeOuterClass {
-  private CouponCodeOuterClass() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface CouponCodeOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.CouponCode)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>string Code = 1;</code>
-     */
-    java.lang.String getCode();
-    /**
-     * <code>string Code = 1;</code>
-     */
-    com.google.protobuf.ByteString
-        getCodeBytes();
-
-    /**
-     * <code>int64 ReceiveTime = 2;</code>
-     */
-    long getReceiveTime();
-
-    /**
-     * <code>string name = 3;</code>
-     */
-    java.lang.String getName();
-    /**
-     * <code>string name = 3;</code>
-     */
-    com.google.protobuf.ByteString
-        getNameBytes();
-  }
-  /**
-   * Protobuf type {@code protobuf.CouponCode}
-   */
-  public  static final class CouponCode extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.CouponCode)
-      CouponCodeOrBuilder {
-    // Use CouponCode.newBuilder() to construct.
-    private CouponCode(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private CouponCode() {
-      code_ = "";
-      receiveTime_ = 0L;
-      name_ = "";
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private CouponCode(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              code_ = s;
-              break;
-            }
-            case 16: {
-
-              receiveTime_ = input.readInt64();
-              break;
-            }
-            case 26: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              name_ = s;
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.kfzs.duanduan.proto.CouponCodeOuterClass.internal_static_protobuf_CouponCode_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return com.kfzs.duanduan.proto.CouponCodeOuterClass.internal_static_protobuf_CouponCode_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode.class, com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode.Builder.class);
-    }
-
-    public static final int CODE_FIELD_NUMBER = 1;
-    private volatile java.lang.Object code_;
-    /**
-     * <code>string Code = 1;</code>
-     */
-    public java.lang.String getCode() {
-      java.lang.Object ref = code_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        code_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string Code = 1;</code>
-     */
-    public com.google.protobuf.ByteString
-        getCodeBytes() {
-      java.lang.Object ref = code_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        code_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    public static final int RECEIVETIME_FIELD_NUMBER = 2;
-    private long receiveTime_;
-    /**
-     * <code>int64 ReceiveTime = 2;</code>
-     */
-    public long getReceiveTime() {
-      return receiveTime_;
-    }
-
-    public static final int NAME_FIELD_NUMBER = 3;
-    private volatile java.lang.Object name_;
-    /**
-     * <code>string name = 3;</code>
-     */
-    public java.lang.String getName() {
-      java.lang.Object ref = name_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        name_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string name = 3;</code>
-     */
-    public com.google.protobuf.ByteString
-        getNameBytes() {
-      java.lang.Object ref = name_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        name_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (!getCodeBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, code_);
-      }
-      if (receiveTime_ != 0L) {
-        output.writeInt64(2, receiveTime_);
-      }
-      if (!getNameBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (!getCodeBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, code_);
-      }
-      if (receiveTime_ != 0L) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt64Size(2, receiveTime_);
-      }
-      if (!getNameBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode)) {
-        return super.equals(obj);
-      }
-      com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode other = (com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode) obj;
-
-      boolean result = true;
-      result = result && getCode()
-          .equals(other.getCode());
-      result = result && (getReceiveTime()
-          == other.getReceiveTime());
-      result = result && getName()
-          .equals(other.getName());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + CODE_FIELD_NUMBER;
-      hash = (53 * hash) + getCode().hashCode();
-      hash = (37 * hash) + RECEIVETIME_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
-          getReceiveTime());
-      hash = (37 * hash) + NAME_FIELD_NUMBER;
-      hash = (53 * hash) + getName().hashCode();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * Protobuf type {@code protobuf.CouponCode}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.CouponCode)
-        com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCodeOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return com.kfzs.duanduan.proto.CouponCodeOuterClass.internal_static_protobuf_CouponCode_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return com.kfzs.duanduan.proto.CouponCodeOuterClass.internal_static_protobuf_CouponCode_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode.class, com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode.Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        code_ = "";
-
-        receiveTime_ = 0L;
-
-        name_ = "";
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return com.kfzs.duanduan.proto.CouponCodeOuterClass.internal_static_protobuf_CouponCode_descriptor;
-      }
-
-      public com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode getDefaultInstanceForType() {
-        return com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode.getDefaultInstance();
-      }
-
-      public com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode build() {
-        com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode buildPartial() {
-        com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode result = new com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode(this);
-        result.code_ = code_;
-        result.receiveTime_ = receiveTime_;
-        result.name_ = name_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode) {
-          return mergeFrom((com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode other) {
-        if (other == com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode.getDefaultInstance()) return this;
-        if (!other.getCode().isEmpty()) {
-          code_ = other.code_;
-          onChanged();
-        }
-        if (other.getReceiveTime() != 0L) {
-          setReceiveTime(other.getReceiveTime());
-        }
-        if (!other.getName().isEmpty()) {
-          name_ = other.name_;
-          onChanged();
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private java.lang.Object code_ = "";
-      /**
-       * <code>string Code = 1;</code>
-       */
-      public java.lang.String getCode() {
-        java.lang.Object ref = code_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          code_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * <code>string Code = 1;</code>
-       */
-      public com.google.protobuf.ByteString
-          getCodeBytes() {
-        java.lang.Object ref = code_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          code_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string Code = 1;</code>
-       */
-      public Builder setCode(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        code_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string Code = 1;</code>
-       */
-      public Builder clearCode() {
-        
-        code_ = getDefaultInstance().getCode();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string Code = 1;</code>
-       */
-      public Builder setCodeBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        code_ = value;
-        onChanged();
-        return this;
-      }
-
-      private long receiveTime_ ;
-      /**
-       * <code>int64 ReceiveTime = 2;</code>
-       */
-      public long getReceiveTime() {
-        return receiveTime_;
-      }
-      /**
-       * <code>int64 ReceiveTime = 2;</code>
-       */
-      public Builder setReceiveTime(long value) {
-        
-        receiveTime_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int64 ReceiveTime = 2;</code>
-       */
-      public Builder clearReceiveTime() {
-        
-        receiveTime_ = 0L;
-        onChanged();
-        return this;
-      }
-
-      private java.lang.Object name_ = "";
-      /**
-       * <code>string name = 3;</code>
-       */
-      public java.lang.String getName() {
-        java.lang.Object ref = name_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          name_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * <code>string name = 3;</code>
-       */
-      public com.google.protobuf.ByteString
-          getNameBytes() {
-        java.lang.Object ref = name_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          name_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string name = 3;</code>
-       */
-      public Builder setName(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        name_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string name = 3;</code>
-       */
-      public Builder clearName() {
-        
-        name_ = getDefaultInstance().getName();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string name = 3;</code>
-       */
-      public Builder setNameBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        name_ = value;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.CouponCode)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.CouponCode)
-    private static final com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode();
-    }
-
-    public static com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<CouponCode>
-        PARSER = new com.google.protobuf.AbstractParser<CouponCode>() {
-      public CouponCode parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new CouponCode(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<CouponCode> parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<CouponCode> getParserForType() {
-      return PARSER;
-    }
-
-    public com.kfzs.duanduan.proto.CouponCodeOuterClass.CouponCode getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_CouponCode_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_CouponCode_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\021coupon_code.proto\022\010protobuf\"=\n\nCouponC" +
-      "ode\022\014\n\004Code\030\001 \001(\t\022\023\n\013ReceiveTime\030\002 \001(\003\022\014" +
-      "\n\004name\030\003 \001(\tB\031\n\027com.kfzs.duanduan.protob" +
-      "\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_CouponCode_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_CouponCode_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_CouponCode_descriptor,
-        new java.lang.String[] { "Code", "ReceiveTime", "Name", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

文件差异内容过多而无法显示
+ 0 - 1480
app/src/main/java/com/kfzs/duanduan/proto/CouponOuterClass.java


文件差异内容过多而无法显示
+ 0 - 1162
app/src/main/java/com/kfzs/duanduan/proto/ExclusiveStartingOuterClass.java


文件差异内容过多而无法显示
+ 0 - 1535
app/src/main/java/com/kfzs/duanduan/proto/GameActivityConfOuterClass.java


文件差异内容过多而无法显示
+ 0 - 3927
app/src/main/java/com/kfzs/duanduan/proto/GameBookOuterClass.java


+ 0 - 620
app/src/main/java/com/kfzs/duanduan/proto/GameGiftRelationOuterClass.java

@@ -1,620 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: game_gift_relation.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class GameGiftRelationOuterClass {
-  private GameGiftRelationOuterClass() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface GameGiftRelationOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.GameGiftRelation)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>int32 Id = 1;</code>
-     */
-    int getId();
-
-    /**
-     * <code>int32 GameId = 2;</code>
-     */
-    int getGameId();
-
-    /**
-     * <code>int32 GiftId = 3;</code>
-     */
-    int getGiftId();
-  }
-  /**
-   * <pre>
-   * option java_outer_classname = "GameGiftRelation";
-   * </pre>
-   *
-   * Protobuf type {@code protobuf.GameGiftRelation}
-   */
-  public  static final class GameGiftRelation extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.GameGiftRelation)
-      GameGiftRelationOrBuilder {
-    // Use GameGiftRelation.newBuilder() to construct.
-    private GameGiftRelation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private GameGiftRelation() {
-      id_ = 0;
-      gameId_ = 0;
-      giftId_ = 0;
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private GameGiftRelation(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 8: {
-
-              id_ = input.readInt32();
-              break;
-            }
-            case 16: {
-
-              gameId_ = input.readInt32();
-              break;
-            }
-            case 24: {
-
-              giftId_ = input.readInt32();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.kfzs.duanduan.proto.GameGiftRelationOuterClass.internal_static_protobuf_GameGiftRelation_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return com.kfzs.duanduan.proto.GameGiftRelationOuterClass.internal_static_protobuf_GameGiftRelation_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation.class, com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation.Builder.class);
-    }
-
-    public static final int ID_FIELD_NUMBER = 1;
-    private int id_;
-    /**
-     * <code>int32 Id = 1;</code>
-     */
-    public int getId() {
-      return id_;
-    }
-
-    public static final int GAMEID_FIELD_NUMBER = 2;
-    private int gameId_;
-    /**
-     * <code>int32 GameId = 2;</code>
-     */
-    public int getGameId() {
-      return gameId_;
-    }
-
-    public static final int GIFTID_FIELD_NUMBER = 3;
-    private int giftId_;
-    /**
-     * <code>int32 GiftId = 3;</code>
-     */
-    public int getGiftId() {
-      return giftId_;
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (id_ != 0) {
-        output.writeInt32(1, id_);
-      }
-      if (gameId_ != 0) {
-        output.writeInt32(2, gameId_);
-      }
-      if (giftId_ != 0) {
-        output.writeInt32(3, giftId_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (id_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(1, id_);
-      }
-      if (gameId_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(2, gameId_);
-      }
-      if (giftId_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(3, giftId_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation)) {
-        return super.equals(obj);
-      }
-      com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation other = (com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation) obj;
-
-      boolean result = true;
-      result = result && (getId()
-          == other.getId());
-      result = result && (getGameId()
-          == other.getGameId());
-      result = result && (getGiftId()
-          == other.getGiftId());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + ID_FIELD_NUMBER;
-      hash = (53 * hash) + getId();
-      hash = (37 * hash) + GAMEID_FIELD_NUMBER;
-      hash = (53 * hash) + getGameId();
-      hash = (37 * hash) + GIFTID_FIELD_NUMBER;
-      hash = (53 * hash) + getGiftId();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * <pre>
-     * option java_outer_classname = "GameGiftRelation";
-     * </pre>
-     *
-     * Protobuf type {@code protobuf.GameGiftRelation}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.GameGiftRelation)
-        com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelationOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return com.kfzs.duanduan.proto.GameGiftRelationOuterClass.internal_static_protobuf_GameGiftRelation_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return com.kfzs.duanduan.proto.GameGiftRelationOuterClass.internal_static_protobuf_GameGiftRelation_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation.class, com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation.Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        id_ = 0;
-
-        gameId_ = 0;
-
-        giftId_ = 0;
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return com.kfzs.duanduan.proto.GameGiftRelationOuterClass.internal_static_protobuf_GameGiftRelation_descriptor;
-      }
-
-      public com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation getDefaultInstanceForType() {
-        return com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation.getDefaultInstance();
-      }
-
-      public com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation build() {
-        com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation buildPartial() {
-        com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation result = new com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation(this);
-        result.id_ = id_;
-        result.gameId_ = gameId_;
-        result.giftId_ = giftId_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation) {
-          return mergeFrom((com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation other) {
-        if (other == com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation.getDefaultInstance()) return this;
-        if (other.getId() != 0) {
-          setId(other.getId());
-        }
-        if (other.getGameId() != 0) {
-          setGameId(other.getGameId());
-        }
-        if (other.getGiftId() != 0) {
-          setGiftId(other.getGiftId());
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private int id_ ;
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public int getId() {
-        return id_;
-      }
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public Builder setId(int value) {
-        
-        id_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public Builder clearId() {
-        
-        id_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private int gameId_ ;
-      /**
-       * <code>int32 GameId = 2;</code>
-       */
-      public int getGameId() {
-        return gameId_;
-      }
-      /**
-       * <code>int32 GameId = 2;</code>
-       */
-      public Builder setGameId(int value) {
-        
-        gameId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 GameId = 2;</code>
-       */
-      public Builder clearGameId() {
-        
-        gameId_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private int giftId_ ;
-      /**
-       * <code>int32 GiftId = 3;</code>
-       */
-      public int getGiftId() {
-        return giftId_;
-      }
-      /**
-       * <code>int32 GiftId = 3;</code>
-       */
-      public Builder setGiftId(int value) {
-        
-        giftId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 GiftId = 3;</code>
-       */
-      public Builder clearGiftId() {
-        
-        giftId_ = 0;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.GameGiftRelation)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.GameGiftRelation)
-    private static final com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation();
-    }
-
-    public static com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<GameGiftRelation>
-        PARSER = new com.google.protobuf.AbstractParser<GameGiftRelation>() {
-      public GameGiftRelation parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new GameGiftRelation(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<GameGiftRelation> parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<GameGiftRelation> getParserForType() {
-      return PARSER;
-    }
-
-    public com.kfzs.duanduan.proto.GameGiftRelationOuterClass.GameGiftRelation getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_GameGiftRelation_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_GameGiftRelation_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\030game_gift_relation.proto\022\010protobuf\">\n\020" +
-      "GameGiftRelation\022\n\n\002Id\030\001 \001(\005\022\016\n\006GameId\030\002" +
-      " \001(\005\022\016\n\006GiftId\030\003 \001(\005B\031\n\027com.kfzs.duandua" +
-      "n.protob\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_GameGiftRelation_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_GameGiftRelation_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_GameGiftRelation_descriptor,
-        new java.lang.String[] { "Id", "GameId", "GiftId", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

文件差异内容过多而无法显示
+ 0 - 4264
app/src/main/java/com/kfzs/duanduan/proto/GameOuterClass.java


文件差异内容过多而无法显示
+ 0 - 1530
app/src/main/java/com/kfzs/duanduan/proto/GameTypeClassOuterClass.java


文件差异内容过多而无法显示
+ 0 - 1140
app/src/main/java/com/kfzs/duanduan/proto/GameTypeOuterClass.java


+ 0 - 683
app/src/main/java/com/kfzs/duanduan/proto/GameTypeRelationOuterClass.java

@@ -1,683 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: game_type_relation.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class GameTypeRelationOuterClass {
-  private GameTypeRelationOuterClass() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface GameTypeRelationOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.GameTypeRelation)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>int32 Id = 1;</code>
-     */
-    int getId();
-
-    /**
-     * <code>int32 GameId = 2;</code>
-     */
-    int getGameId();
-
-    /**
-     * <code>int32 TypeId = 3;</code>
-     */
-    int getTypeId();
-
-    /**
-     * <code>int32 Mark = 4;</code>
-     */
-    int getMark();
-  }
-  /**
-   * <pre>
-   * option java_outer_classname = "Game_type_relation";
-   * </pre>
-   *
-   * Protobuf type {@code protobuf.GameTypeRelation}
-   */
-  public  static final class GameTypeRelation extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.GameTypeRelation)
-      GameTypeRelationOrBuilder {
-    // Use GameTypeRelation.newBuilder() to construct.
-    private GameTypeRelation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private GameTypeRelation() {
-      id_ = 0;
-      gameId_ = 0;
-      typeId_ = 0;
-      mark_ = 0;
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private GameTypeRelation(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 8: {
-
-              id_ = input.readInt32();
-              break;
-            }
-            case 16: {
-
-              gameId_ = input.readInt32();
-              break;
-            }
-            case 24: {
-
-              typeId_ = input.readInt32();
-              break;
-            }
-            case 32: {
-
-              mark_ = input.readInt32();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.kfzs.duanduan.proto.GameTypeRelationOuterClass.internal_static_protobuf_GameTypeRelation_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return com.kfzs.duanduan.proto.GameTypeRelationOuterClass.internal_static_protobuf_GameTypeRelation_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation.class, com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation.Builder.class);
-    }
-
-    public static final int ID_FIELD_NUMBER = 1;
-    private int id_;
-    /**
-     * <code>int32 Id = 1;</code>
-     */
-    public int getId() {
-      return id_;
-    }
-
-    public static final int GAMEID_FIELD_NUMBER = 2;
-    private int gameId_;
-    /**
-     * <code>int32 GameId = 2;</code>
-     */
-    public int getGameId() {
-      return gameId_;
-    }
-
-    public static final int TYPEID_FIELD_NUMBER = 3;
-    private int typeId_;
-    /**
-     * <code>int32 TypeId = 3;</code>
-     */
-    public int getTypeId() {
-      return typeId_;
-    }
-
-    public static final int MARK_FIELD_NUMBER = 4;
-    private int mark_;
-    /**
-     * <code>int32 Mark = 4;</code>
-     */
-    public int getMark() {
-      return mark_;
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (id_ != 0) {
-        output.writeInt32(1, id_);
-      }
-      if (gameId_ != 0) {
-        output.writeInt32(2, gameId_);
-      }
-      if (typeId_ != 0) {
-        output.writeInt32(3, typeId_);
-      }
-      if (mark_ != 0) {
-        output.writeInt32(4, mark_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (id_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(1, id_);
-      }
-      if (gameId_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(2, gameId_);
-      }
-      if (typeId_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(3, typeId_);
-      }
-      if (mark_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(4, mark_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation)) {
-        return super.equals(obj);
-      }
-      com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation other = (com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation) obj;
-
-      boolean result = true;
-      result = result && (getId()
-          == other.getId());
-      result = result && (getGameId()
-          == other.getGameId());
-      result = result && (getTypeId()
-          == other.getTypeId());
-      result = result && (getMark()
-          == other.getMark());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + ID_FIELD_NUMBER;
-      hash = (53 * hash) + getId();
-      hash = (37 * hash) + GAMEID_FIELD_NUMBER;
-      hash = (53 * hash) + getGameId();
-      hash = (37 * hash) + TYPEID_FIELD_NUMBER;
-      hash = (53 * hash) + getTypeId();
-      hash = (37 * hash) + MARK_FIELD_NUMBER;
-      hash = (53 * hash) + getMark();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * <pre>
-     * option java_outer_classname = "Game_type_relation";
-     * </pre>
-     *
-     * Protobuf type {@code protobuf.GameTypeRelation}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.GameTypeRelation)
-        com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelationOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return com.kfzs.duanduan.proto.GameTypeRelationOuterClass.internal_static_protobuf_GameTypeRelation_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return com.kfzs.duanduan.proto.GameTypeRelationOuterClass.internal_static_protobuf_GameTypeRelation_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation.class, com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation.Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        id_ = 0;
-
-        gameId_ = 0;
-
-        typeId_ = 0;
-
-        mark_ = 0;
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return com.kfzs.duanduan.proto.GameTypeRelationOuterClass.internal_static_protobuf_GameTypeRelation_descriptor;
-      }
-
-      public com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation getDefaultInstanceForType() {
-        return com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation.getDefaultInstance();
-      }
-
-      public com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation build() {
-        com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation buildPartial() {
-        com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation result = new com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation(this);
-        result.id_ = id_;
-        result.gameId_ = gameId_;
-        result.typeId_ = typeId_;
-        result.mark_ = mark_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation) {
-          return mergeFrom((com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation other) {
-        if (other == com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation.getDefaultInstance()) return this;
-        if (other.getId() != 0) {
-          setId(other.getId());
-        }
-        if (other.getGameId() != 0) {
-          setGameId(other.getGameId());
-        }
-        if (other.getTypeId() != 0) {
-          setTypeId(other.getTypeId());
-        }
-        if (other.getMark() != 0) {
-          setMark(other.getMark());
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private int id_ ;
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public int getId() {
-        return id_;
-      }
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public Builder setId(int value) {
-        
-        id_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public Builder clearId() {
-        
-        id_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private int gameId_ ;
-      /**
-       * <code>int32 GameId = 2;</code>
-       */
-      public int getGameId() {
-        return gameId_;
-      }
-      /**
-       * <code>int32 GameId = 2;</code>
-       */
-      public Builder setGameId(int value) {
-        
-        gameId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 GameId = 2;</code>
-       */
-      public Builder clearGameId() {
-        
-        gameId_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private int typeId_ ;
-      /**
-       * <code>int32 TypeId = 3;</code>
-       */
-      public int getTypeId() {
-        return typeId_;
-      }
-      /**
-       * <code>int32 TypeId = 3;</code>
-       */
-      public Builder setTypeId(int value) {
-        
-        typeId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 TypeId = 3;</code>
-       */
-      public Builder clearTypeId() {
-        
-        typeId_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private int mark_ ;
-      /**
-       * <code>int32 Mark = 4;</code>
-       */
-      public int getMark() {
-        return mark_;
-      }
-      /**
-       * <code>int32 Mark = 4;</code>
-       */
-      public Builder setMark(int value) {
-        
-        mark_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 Mark = 4;</code>
-       */
-      public Builder clearMark() {
-        
-        mark_ = 0;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.GameTypeRelation)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.GameTypeRelation)
-    private static final com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation();
-    }
-
-    public static com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<GameTypeRelation>
-        PARSER = new com.google.protobuf.AbstractParser<GameTypeRelation>() {
-      public GameTypeRelation parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new GameTypeRelation(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<GameTypeRelation> parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<GameTypeRelation> getParserForType() {
-      return PARSER;
-    }
-
-    public com.kfzs.duanduan.proto.GameTypeRelationOuterClass.GameTypeRelation getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_GameTypeRelation_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_GameTypeRelation_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\030game_type_relation.proto\022\010protobuf\"L\n\020" +
-      "GameTypeRelation\022\n\n\002Id\030\001 \001(\005\022\016\n\006GameId\030\002" +
-      " \001(\005\022\016\n\006TypeId\030\003 \001(\005\022\014\n\004Mark\030\004 \001(\005B\031\n\027co" +
-      "m.kfzs.duanduan.protob\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_GameTypeRelation_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_GameTypeRelation_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_GameTypeRelation_descriptor,
-        new java.lang.String[] { "Id", "GameId", "TypeId", "Mark", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

+ 0 - 768
app/src/main/java/com/kfzs/duanduan/proto/GameTypeSpecialOuterClass.java

@@ -1,768 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: game_type_special.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class GameTypeSpecialOuterClass {
-  private GameTypeSpecialOuterClass() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface GameTypeSpecialOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.GameTypeSpecial)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>int32 GameTypeId = 1;</code>
-     */
-    int getGameTypeId();
-
-    /**
-     * <code>string Icon = 2;</code>
-     */
-    String getIcon();
-    /**
-     * <code>string Icon = 2;</code>
-     */
-    com.google.protobuf.ByteString
-        getIconBytes();
-
-    /**
-     * <code>string HighlightIcon = 3;</code>
-     */
-    String getHighlightIcon();
-    /**
-     * <code>string HighlightIcon = 3;</code>
-     */
-    com.google.protobuf.ByteString
-        getHighlightIconBytes();
-  }
-  /**
-   * <pre>
-   * option java_outer_classname = "Game_type";
-   * </pre>
-   *
-   * Protobuf type {@code protobuf.GameTypeSpecial}
-   */
-  public  static final class GameTypeSpecial extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.GameTypeSpecial)
-      GameTypeSpecialOrBuilder {
-    // Use GameTypeSpecial.newBuilder() to construct.
-    private GameTypeSpecial(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private GameTypeSpecial() {
-      gameTypeId_ = 0;
-      icon_ = "";
-      highlightIcon_ = "";
-    }
-
-    @Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private GameTypeSpecial(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 8: {
-
-              gameTypeId_ = input.readInt32();
-              break;
-            }
-            case 18: {
-              String s = input.readStringRequireUtf8();
-
-              icon_ = s;
-              break;
-            }
-            case 26: {
-              String s = input.readStringRequireUtf8();
-
-              highlightIcon_ = s;
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return GameTypeSpecialOuterClass.internal_static_protobuf_GameTypeSpecial_descriptor;
-    }
-
-    protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return GameTypeSpecialOuterClass.internal_static_protobuf_GameTypeSpecial_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              GameTypeSpecial.class, Builder.class);
-    }
-
-    public static final int GAMETYPEID_FIELD_NUMBER = 1;
-    private int gameTypeId_;
-    /**
-     * <code>int32 GameTypeId = 1;</code>
-     */
-    public int getGameTypeId() {
-      return gameTypeId_;
-    }
-
-    public static final int ICON_FIELD_NUMBER = 2;
-    private volatile Object icon_;
-    /**
-     * <code>string Icon = 2;</code>
-     */
-    public String getIcon() {
-      Object ref = icon_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        icon_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string Icon = 2;</code>
-     */
-    public com.google.protobuf.ByteString
-        getIconBytes() {
-      Object ref = icon_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        icon_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    public static final int HIGHLIGHTICON_FIELD_NUMBER = 3;
-    private volatile Object highlightIcon_;
-    /**
-     * <code>string HighlightIcon = 3;</code>
-     */
-    public String getHighlightIcon() {
-      Object ref = highlightIcon_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        highlightIcon_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string HighlightIcon = 3;</code>
-     */
-    public com.google.protobuf.ByteString
-        getHighlightIconBytes() {
-      Object ref = highlightIcon_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        highlightIcon_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (gameTypeId_ != 0) {
-        output.writeInt32(1, gameTypeId_);
-      }
-      if (!getIconBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, icon_);
-      }
-      if (!getHighlightIconBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, highlightIcon_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (gameTypeId_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(1, gameTypeId_);
-      }
-      if (!getIconBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, icon_);
-      }
-      if (!getHighlightIconBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, highlightIcon_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @Override
-    public boolean equals(final Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof GameTypeSpecial)) {
-        return super.equals(obj);
-      }
-      GameTypeSpecial other = (GameTypeSpecial) obj;
-
-      boolean result = true;
-      result = result && (getGameTypeId()
-          == other.getGameTypeId());
-      result = result && getIcon()
-          .equals(other.getIcon());
-      result = result && getHighlightIcon()
-          .equals(other.getHighlightIcon());
-      return result;
-    }
-
-    @Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + GAMETYPEID_FIELD_NUMBER;
-      hash = (53 * hash) + getGameTypeId();
-      hash = (37 * hash) + ICON_FIELD_NUMBER;
-      hash = (53 * hash) + getIcon().hashCode();
-      hash = (37 * hash) + HIGHLIGHTICON_FIELD_NUMBER;
-      hash = (53 * hash) + getHighlightIcon().hashCode();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static GameTypeSpecial parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static GameTypeSpecial parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static GameTypeSpecial parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static GameTypeSpecial parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static GameTypeSpecial parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static GameTypeSpecial parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static GameTypeSpecial parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static GameTypeSpecial parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static GameTypeSpecial parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static GameTypeSpecial parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(GameTypeSpecial prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @Override
-    protected Builder newBuilderForType(
-        BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * <pre>
-     * option java_outer_classname = "Game_type";
-     * </pre>
-     *
-     * Protobuf type {@code protobuf.GameTypeSpecial}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.GameTypeSpecial)
-        GameTypeSpecialOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return GameTypeSpecialOuterClass.internal_static_protobuf_GameTypeSpecial_descriptor;
-      }
-
-      protected FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return GameTypeSpecialOuterClass.internal_static_protobuf_GameTypeSpecial_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                GameTypeSpecial.class, Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.GameTypeSpecialOuterClass.GameTypeSpecial.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        gameTypeId_ = 0;
-
-        icon_ = "";
-
-        highlightIcon_ = "";
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return GameTypeSpecialOuterClass.internal_static_protobuf_GameTypeSpecial_descriptor;
-      }
-
-      public GameTypeSpecial getDefaultInstanceForType() {
-        return GameTypeSpecial.getDefaultInstance();
-      }
-
-      public GameTypeSpecial build() {
-        GameTypeSpecial result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public GameTypeSpecial buildPartial() {
-        GameTypeSpecial result = new GameTypeSpecial(this);
-        result.gameTypeId_ = gameTypeId_;
-        result.icon_ = icon_;
-        result.highlightIcon_ = highlightIcon_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof GameTypeSpecial) {
-          return mergeFrom((GameTypeSpecial)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(GameTypeSpecial other) {
-        if (other == GameTypeSpecial.getDefaultInstance()) return this;
-        if (other.getGameTypeId() != 0) {
-          setGameTypeId(other.getGameTypeId());
-        }
-        if (!other.getIcon().isEmpty()) {
-          icon_ = other.icon_;
-          onChanged();
-        }
-        if (!other.getHighlightIcon().isEmpty()) {
-          highlightIcon_ = other.highlightIcon_;
-          onChanged();
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        GameTypeSpecial parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (GameTypeSpecial) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private int gameTypeId_ ;
-      /**
-       * <code>int32 GameTypeId = 1;</code>
-       */
-      public int getGameTypeId() {
-        return gameTypeId_;
-      }
-      /**
-       * <code>int32 GameTypeId = 1;</code>
-       */
-      public Builder setGameTypeId(int value) {
-        
-        gameTypeId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 GameTypeId = 1;</code>
-       */
-      public Builder clearGameTypeId() {
-        
-        gameTypeId_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private Object icon_ = "";
-      /**
-       * <code>string Icon = 2;</code>
-       */
-      public String getIcon() {
-        Object ref = icon_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          icon_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * <code>string Icon = 2;</code>
-       */
-      public com.google.protobuf.ByteString
-          getIconBytes() {
-        Object ref = icon_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          icon_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string Icon = 2;</code>
-       */
-      public Builder setIcon(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        icon_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string Icon = 2;</code>
-       */
-      public Builder clearIcon() {
-        
-        icon_ = getDefaultInstance().getIcon();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string Icon = 2;</code>
-       */
-      public Builder setIconBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        icon_ = value;
-        onChanged();
-        return this;
-      }
-
-      private Object highlightIcon_ = "";
-      /**
-       * <code>string HighlightIcon = 3;</code>
-       */
-      public String getHighlightIcon() {
-        Object ref = highlightIcon_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          highlightIcon_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * <code>string HighlightIcon = 3;</code>
-       */
-      public com.google.protobuf.ByteString
-          getHighlightIconBytes() {
-        Object ref = highlightIcon_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          highlightIcon_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string HighlightIcon = 3;</code>
-       */
-      public Builder setHighlightIcon(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        highlightIcon_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string HighlightIcon = 3;</code>
-       */
-      public Builder clearHighlightIcon() {
-        
-        highlightIcon_ = getDefaultInstance().getHighlightIcon();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string HighlightIcon = 3;</code>
-       */
-      public Builder setHighlightIconBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        highlightIcon_ = value;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.GameTypeSpecial)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.GameTypeSpecial)
-    private static final GameTypeSpecial DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new GameTypeSpecial();
-    }
-
-    public static GameTypeSpecial getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<GameTypeSpecial>
-        PARSER = new com.google.protobuf.AbstractParser<GameTypeSpecial>() {
-      public GameTypeSpecial parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new GameTypeSpecial(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<GameTypeSpecial> parser() {
-      return PARSER;
-    }
-
-    @Override
-    public com.google.protobuf.Parser<GameTypeSpecial> getParserForType() {
-      return PARSER;
-    }
-
-    public GameTypeSpecial getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_GameTypeSpecial_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_GameTypeSpecial_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    String[] descriptorData = {
-      "\n\027game_type_special.proto\022\010protobuf\"J\n\017G" +
-      "ameTypeSpecial\022\022\n\nGameTypeId\030\001 \001(\005\022\014\n\004Ic" +
-      "on\030\002 \001(\t\022\025\n\rHighlightIcon\030\003 \001(\tB\031\n\027com.k" +
-      "fzs.duanduan.protob\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_GameTypeSpecial_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_GameTypeSpecial_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_GameTypeSpecial_descriptor,
-        new String[] { "GameTypeId", "Icon", "HighlightIcon", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

文件差异内容过多而无法显示
+ 0 - 1162
app/src/main/java/com/kfzs/duanduan/proto/GamesList.java


文件差异内容过多而无法显示
+ 0 - 1086
app/src/main/java/com/kfzs/duanduan/proto/GiftCenterOuterClass.java


+ 0 - 893
app/src/main/java/com/kfzs/duanduan/proto/GiftCodeOuterClass.java

@@ -1,893 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: gift_code.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class GiftCodeOuterClass {
-  private GiftCodeOuterClass() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface GiftCodeOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.GiftCode)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>int64 Id = 1;</code>
-     */
-    long getId();
-
-    /**
-     * <code>int64 GiftId = 3;</code>
-     */
-    long getGiftId();
-
-    /**
-     * <pre>
-     * 礼包码
-     * </pre>
-     *
-     * <code>string GiftCode = 5;</code>
-     */
-    java.lang.String getGiftCode();
-    /**
-     * <pre>
-     * 礼包码
-     * </pre>
-     *
-     * <code>string GiftCode = 5;</code>
-     */
-    com.google.protobuf.ByteString
-        getGiftCodeBytes();
-
-    /**
-     * <pre>
-     * </pre>
-     *
-     * <code>int32 UserId = 6;</code>
-     */
-    int getUserId();
-
-    /**
-     * <pre>
-     * 礼包状态
-     * </pre>
-     *
-     * <code>int32 Status = 7;</code>
-     */
-    int getStatus();
-  }
-  /**
-   * <pre>
-   * 礼包码
-   * </pre>
-   *
-   * Protobuf type {@code protobuf.GiftCode}
-   */
-  public  static final class GiftCode extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.GiftCode)
-      GiftCodeOrBuilder {
-    // Use GiftCode.newBuilder() to construct.
-    private GiftCode(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private GiftCode() {
-      id_ = 0L;
-      giftId_ = 0L;
-      giftCode_ = "";
-      userId_ = 0;
-      status_ = 0;
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private GiftCode(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 8: {
-
-              id_ = input.readInt64();
-              break;
-            }
-            case 24: {
-
-              giftId_ = input.readInt64();
-              break;
-            }
-            case 42: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              giftCode_ = s;
-              break;
-            }
-            case 48: {
-
-              userId_ = input.readInt32();
-              break;
-            }
-            case 56: {
-
-              status_ = input.readInt32();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.kfzs.duanduan.proto.GiftCodeOuterClass.internal_static_protobuf_GiftCode_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return com.kfzs.duanduan.proto.GiftCodeOuterClass.internal_static_protobuf_GiftCode_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode.class, com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode.Builder.class);
-    }
-
-    public static final int ID_FIELD_NUMBER = 1;
-    private long id_;
-    /**
-     * <code>int64 Id = 1;</code>
-     */
-    public long getId() {
-      return id_;
-    }
-
-    public static final int GIFTID_FIELD_NUMBER = 3;
-    private long giftId_;
-    /**
-     * <code>int64 GiftId = 3;</code>
-     */
-    public long getGiftId() {
-      return giftId_;
-    }
-
-    public static final int GIFTCODE_FIELD_NUMBER = 5;
-    private volatile java.lang.Object giftCode_;
-    /**
-     * <pre>
-     * 礼包码
-     * </pre>
-     *
-     * <code>string GiftCode = 5;</code>
-     */
-    public java.lang.String getGiftCode() {
-      java.lang.Object ref = giftCode_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        giftCode_ = s;
-        return s;
-      }
-    }
-    /**
-     * <pre>
-     * 礼包码
-     * </pre>
-     *
-     * <code>string GiftCode = 5;</code>
-     */
-    public com.google.protobuf.ByteString
-        getGiftCodeBytes() {
-      java.lang.Object ref = giftCode_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        giftCode_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    public static final int USERID_FIELD_NUMBER = 6;
-    private int userId_;
-    /**
-     * <pre>
-     * </pre>
-     *
-     * <code>int32 UserId = 6;</code>
-     */
-    public int getUserId() {
-      return userId_;
-    }
-
-    public static final int STATUS_FIELD_NUMBER = 7;
-    private int status_;
-    /**
-     * <pre>
-     * 礼包状态
-     * </pre>
-     *
-     * <code>int32 Status = 7;</code>
-     */
-    public int getStatus() {
-      return status_;
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (id_ != 0L) {
-        output.writeInt64(1, id_);
-      }
-      if (giftId_ != 0L) {
-        output.writeInt64(3, giftId_);
-      }
-      if (!getGiftCodeBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, giftCode_);
-      }
-      if (userId_ != 0) {
-        output.writeInt32(6, userId_);
-      }
-      if (status_ != 0) {
-        output.writeInt32(7, status_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (id_ != 0L) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt64Size(1, id_);
-      }
-      if (giftId_ != 0L) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt64Size(3, giftId_);
-      }
-      if (!getGiftCodeBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, giftCode_);
-      }
-      if (userId_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(6, userId_);
-      }
-      if (status_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(7, status_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode)) {
-        return super.equals(obj);
-      }
-      com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode other = (com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode) obj;
-
-      boolean result = true;
-      result = result && (getId()
-          == other.getId());
-      result = result && (getGiftId()
-          == other.getGiftId());
-      result = result && getGiftCode()
-          .equals(other.getGiftCode());
-      result = result && (getUserId()
-          == other.getUserId());
-      result = result && (getStatus()
-          == other.getStatus());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + ID_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
-          getId());
-      hash = (37 * hash) + GIFTID_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
-          getGiftId());
-      hash = (37 * hash) + GIFTCODE_FIELD_NUMBER;
-      hash = (53 * hash) + getGiftCode().hashCode();
-      hash = (37 * hash) + USERID_FIELD_NUMBER;
-      hash = (53 * hash) + getUserId();
-      hash = (37 * hash) + STATUS_FIELD_NUMBER;
-      hash = (53 * hash) + getStatus();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * <pre>
-     * 礼包码
-     * </pre>
-     *
-     * Protobuf type {@code protobuf.GiftCode}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.GiftCode)
-        com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCodeOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return com.kfzs.duanduan.proto.GiftCodeOuterClass.internal_static_protobuf_GiftCode_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return com.kfzs.duanduan.proto.GiftCodeOuterClass.internal_static_protobuf_GiftCode_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode.class, com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode.Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        id_ = 0L;
-
-        giftId_ = 0L;
-
-        giftCode_ = "";
-
-        userId_ = 0;
-
-        status_ = 0;
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return com.kfzs.duanduan.proto.GiftCodeOuterClass.internal_static_protobuf_GiftCode_descriptor;
-      }
-
-      public com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode getDefaultInstanceForType() {
-        return com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode.getDefaultInstance();
-      }
-
-      public com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode build() {
-        com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode buildPartial() {
-        com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode result = new com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode(this);
-        result.id_ = id_;
-        result.giftId_ = giftId_;
-        result.giftCode_ = giftCode_;
-        result.userId_ = userId_;
-        result.status_ = status_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode) {
-          return mergeFrom((com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode other) {
-        if (other == com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode.getDefaultInstance()) return this;
-        if (other.getId() != 0L) {
-          setId(other.getId());
-        }
-        if (other.getGiftId() != 0L) {
-          setGiftId(other.getGiftId());
-        }
-        if (!other.getGiftCode().isEmpty()) {
-          giftCode_ = other.giftCode_;
-          onChanged();
-        }
-        if (other.getUserId() != 0) {
-          setUserId(other.getUserId());
-        }
-        if (other.getStatus() != 0) {
-          setStatus(other.getStatus());
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private long id_ ;
-      /**
-       * <code>int64 Id = 1;</code>
-       */
-      public long getId() {
-        return id_;
-      }
-      /**
-       * <code>int64 Id = 1;</code>
-       */
-      public Builder setId(long value) {
-        
-        id_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int64 Id = 1;</code>
-       */
-      public Builder clearId() {
-        
-        id_ = 0L;
-        onChanged();
-        return this;
-      }
-
-      private long giftId_ ;
-      /**
-       * <code>int64 GiftId = 3;</code>
-       */
-      public long getGiftId() {
-        return giftId_;
-      }
-      /**
-       * <code>int64 GiftId = 3;</code>
-       */
-      public Builder setGiftId(long value) {
-        
-        giftId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int64 GiftId = 3;</code>
-       */
-      public Builder clearGiftId() {
-        
-        giftId_ = 0L;
-        onChanged();
-        return this;
-      }
-
-      private java.lang.Object giftCode_ = "";
-      /**
-       * <pre>
-       * 礼包码
-       * </pre>
-       *
-       * <code>string GiftCode = 5;</code>
-       */
-      public java.lang.String getGiftCode() {
-        java.lang.Object ref = giftCode_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          giftCode_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * <pre>
-       * 礼包码
-       * </pre>
-       *
-       * <code>string GiftCode = 5;</code>
-       */
-      public com.google.protobuf.ByteString
-          getGiftCodeBytes() {
-        java.lang.Object ref = giftCode_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          giftCode_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <pre>
-       * 礼包码
-       * </pre>
-       *
-       * <code>string GiftCode = 5;</code>
-       */
-      public Builder setGiftCode(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        giftCode_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <pre>
-       * 礼包码
-       * </pre>
-       *
-       * <code>string GiftCode = 5;</code>
-       */
-      public Builder clearGiftCode() {
-        
-        giftCode_ = getDefaultInstance().getGiftCode();
-        onChanged();
-        return this;
-      }
-      /**
-       * <pre>
-       * 礼包码
-       * </pre>
-       *
-       * <code>string GiftCode = 5;</code>
-       */
-      public Builder setGiftCodeBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        giftCode_ = value;
-        onChanged();
-        return this;
-      }
-
-      private int userId_ ;
-      /**
-       * <pre>
-       * </pre>
-       *
-       * <code>int32 UserId = 6;</code>
-       */
-      public int getUserId() {
-        return userId_;
-      }
-      /**
-       * <pre>
-       * </pre>
-       *
-       * <code>int32 UserId = 6;</code>
-       */
-      public Builder setUserId(int value) {
-        
-        userId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <pre>
-       * </pre>
-       *
-       * <code>int32 UserId = 6;</code>
-       */
-      public Builder clearUserId() {
-        
-        userId_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private int status_ ;
-      /**
-       * <pre>
-       * 礼包状态
-       * </pre>
-       *
-       * <code>int32 Status = 7;</code>
-       */
-      public int getStatus() {
-        return status_;
-      }
-      /**
-       * <pre>
-       * 礼包状态
-       * </pre>
-       *
-       * <code>int32 Status = 7;</code>
-       */
-      public Builder setStatus(int value) {
-        
-        status_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <pre>
-       * 礼包状态
-       * </pre>
-       *
-       * <code>int32 Status = 7;</code>
-       */
-      public Builder clearStatus() {
-        
-        status_ = 0;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.GiftCode)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.GiftCode)
-    private static final com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode();
-    }
-
-    public static com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<GiftCode>
-        PARSER = new com.google.protobuf.AbstractParser<GiftCode>() {
-      public GiftCode parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new GiftCode(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<GiftCode> parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<GiftCode> getParserForType() {
-      return PARSER;
-    }
-
-    public com.kfzs.duanduan.proto.GiftCodeOuterClass.GiftCode getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_GiftCode_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_GiftCode_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\017gift_code.proto\022\010protobuf\"X\n\010GiftCode\022" +
-      "\n\n\002Id\030\001 \001(\003\022\016\n\006GiftId\030\003 \001(\003\022\020\n\010GiftCode\030" +
-      "\005 \001(\t\022\016\n\006UserId\030\006 \001(\005\022\016\n\006Status\030\007 \001(\005B\031\n" +
-      "\027com.kfzs.duanduan.protob\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_GiftCode_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_GiftCode_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_GiftCode_descriptor,
-        new java.lang.String[] { "Id", "GiftId", "GiftCode", "UserId", "Status", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

文件差异内容过多而无法显示
+ 0 - 1295
app/src/main/java/com/kfzs/duanduan/proto/GiftOuterClass.java


+ 0 - 759
app/src/main/java/com/kfzs/duanduan/proto/GiftTypeOuterClass.java

@@ -1,759 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: gift_type.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class GiftTypeOuterClass {
-  private GiftTypeOuterClass() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface GiftTypeOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.GiftType)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>int32 id = 1;</code>
-     */
-    int getId();
-
-    /**
-     * <code>string gift_type_name = 2;</code>
-     */
-    java.lang.String getGiftTypeName();
-    /**
-     * <code>string gift_type_name = 2;</code>
-     */
-    com.google.protobuf.ByteString
-        getGiftTypeNameBytes();
-
-    /**
-     * <code>int64 created_time = 3;</code>
-     */
-    long getCreatedTime();
-
-    /**
-     * <code>int64 updated_time = 4;</code>
-     */
-    long getUpdatedTime();
-  }
-  /**
-   * <pre>
-   * option java_outer_classname = "GiftType";
-   * </pre>
-   *
-   * Protobuf type {@code protobuf.GiftType}
-   */
-  public  static final class GiftType extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.GiftType)
-      GiftTypeOrBuilder {
-    // Use GiftType.newBuilder() to construct.
-    private GiftType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private GiftType() {
-      id_ = 0;
-      giftTypeName_ = "";
-      createdTime_ = 0L;
-      updatedTime_ = 0L;
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private GiftType(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 8: {
-
-              id_ = input.readInt32();
-              break;
-            }
-            case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              giftTypeName_ = s;
-              break;
-            }
-            case 24: {
-
-              createdTime_ = input.readInt64();
-              break;
-            }
-            case 32: {
-
-              updatedTime_ = input.readInt64();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.kfzs.duanduan.proto.GiftTypeOuterClass.internal_static_protobuf_GiftType_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return com.kfzs.duanduan.proto.GiftTypeOuterClass.internal_static_protobuf_GiftType_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType.class, com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType.Builder.class);
-    }
-
-    public static final int ID_FIELD_NUMBER = 1;
-    private int id_;
-    /**
-     * <code>int32 id = 1;</code>
-     */
-    public int getId() {
-      return id_;
-    }
-
-    public static final int GIFT_TYPE_NAME_FIELD_NUMBER = 2;
-    private volatile java.lang.Object giftTypeName_;
-    /**
-     * <code>string gift_type_name = 2;</code>
-     */
-    public java.lang.String getGiftTypeName() {
-      java.lang.Object ref = giftTypeName_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        giftTypeName_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string gift_type_name = 2;</code>
-     */
-    public com.google.protobuf.ByteString
-        getGiftTypeNameBytes() {
-      java.lang.Object ref = giftTypeName_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        giftTypeName_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    public static final int CREATED_TIME_FIELD_NUMBER = 3;
-    private long createdTime_;
-    /**
-     * <code>int64 created_time = 3;</code>
-     */
-    public long getCreatedTime() {
-      return createdTime_;
-    }
-
-    public static final int UPDATED_TIME_FIELD_NUMBER = 4;
-    private long updatedTime_;
-    /**
-     * <code>int64 updated_time = 4;</code>
-     */
-    public long getUpdatedTime() {
-      return updatedTime_;
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (id_ != 0) {
-        output.writeInt32(1, id_);
-      }
-      if (!getGiftTypeNameBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, giftTypeName_);
-      }
-      if (createdTime_ != 0L) {
-        output.writeInt64(3, createdTime_);
-      }
-      if (updatedTime_ != 0L) {
-        output.writeInt64(4, updatedTime_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (id_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(1, id_);
-      }
-      if (!getGiftTypeNameBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, giftTypeName_);
-      }
-      if (createdTime_ != 0L) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt64Size(3, createdTime_);
-      }
-      if (updatedTime_ != 0L) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt64Size(4, updatedTime_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType)) {
-        return super.equals(obj);
-      }
-      com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType other = (com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType) obj;
-
-      boolean result = true;
-      result = result && (getId()
-          == other.getId());
-      result = result && getGiftTypeName()
-          .equals(other.getGiftTypeName());
-      result = result && (getCreatedTime()
-          == other.getCreatedTime());
-      result = result && (getUpdatedTime()
-          == other.getUpdatedTime());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + ID_FIELD_NUMBER;
-      hash = (53 * hash) + getId();
-      hash = (37 * hash) + GIFT_TYPE_NAME_FIELD_NUMBER;
-      hash = (53 * hash) + getGiftTypeName().hashCode();
-      hash = (37 * hash) + CREATED_TIME_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
-          getCreatedTime());
-      hash = (37 * hash) + UPDATED_TIME_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
-          getUpdatedTime());
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * <pre>
-     * option java_outer_classname = "GiftType";
-     * </pre>
-     *
-     * Protobuf type {@code protobuf.GiftType}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.GiftType)
-        com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftTypeOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return com.kfzs.duanduan.proto.GiftTypeOuterClass.internal_static_protobuf_GiftType_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return com.kfzs.duanduan.proto.GiftTypeOuterClass.internal_static_protobuf_GiftType_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType.class, com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType.Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        id_ = 0;
-
-        giftTypeName_ = "";
-
-        createdTime_ = 0L;
-
-        updatedTime_ = 0L;
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return com.kfzs.duanduan.proto.GiftTypeOuterClass.internal_static_protobuf_GiftType_descriptor;
-      }
-
-      public com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType getDefaultInstanceForType() {
-        return com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType.getDefaultInstance();
-      }
-
-      public com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType build() {
-        com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType buildPartial() {
-        com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType result = new com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType(this);
-        result.id_ = id_;
-        result.giftTypeName_ = giftTypeName_;
-        result.createdTime_ = createdTime_;
-        result.updatedTime_ = updatedTime_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType) {
-          return mergeFrom((com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType other) {
-        if (other == com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType.getDefaultInstance()) return this;
-        if (other.getId() != 0) {
-          setId(other.getId());
-        }
-        if (!other.getGiftTypeName().isEmpty()) {
-          giftTypeName_ = other.giftTypeName_;
-          onChanged();
-        }
-        if (other.getCreatedTime() != 0L) {
-          setCreatedTime(other.getCreatedTime());
-        }
-        if (other.getUpdatedTime() != 0L) {
-          setUpdatedTime(other.getUpdatedTime());
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private int id_ ;
-      /**
-       * <code>int32 id = 1;</code>
-       */
-      public int getId() {
-        return id_;
-      }
-      /**
-       * <code>int32 id = 1;</code>
-       */
-      public Builder setId(int value) {
-        
-        id_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 id = 1;</code>
-       */
-      public Builder clearId() {
-        
-        id_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private java.lang.Object giftTypeName_ = "";
-      /**
-       * <code>string gift_type_name = 2;</code>
-       */
-      public java.lang.String getGiftTypeName() {
-        java.lang.Object ref = giftTypeName_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          giftTypeName_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * <code>string gift_type_name = 2;</code>
-       */
-      public com.google.protobuf.ByteString
-          getGiftTypeNameBytes() {
-        java.lang.Object ref = giftTypeName_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          giftTypeName_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string gift_type_name = 2;</code>
-       */
-      public Builder setGiftTypeName(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        giftTypeName_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string gift_type_name = 2;</code>
-       */
-      public Builder clearGiftTypeName() {
-        
-        giftTypeName_ = getDefaultInstance().getGiftTypeName();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string gift_type_name = 2;</code>
-       */
-      public Builder setGiftTypeNameBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        giftTypeName_ = value;
-        onChanged();
-        return this;
-      }
-
-      private long createdTime_ ;
-      /**
-       * <code>int64 created_time = 3;</code>
-       */
-      public long getCreatedTime() {
-        return createdTime_;
-      }
-      /**
-       * <code>int64 created_time = 3;</code>
-       */
-      public Builder setCreatedTime(long value) {
-        
-        createdTime_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int64 created_time = 3;</code>
-       */
-      public Builder clearCreatedTime() {
-        
-        createdTime_ = 0L;
-        onChanged();
-        return this;
-      }
-
-      private long updatedTime_ ;
-      /**
-       * <code>int64 updated_time = 4;</code>
-       */
-      public long getUpdatedTime() {
-        return updatedTime_;
-      }
-      /**
-       * <code>int64 updated_time = 4;</code>
-       */
-      public Builder setUpdatedTime(long value) {
-        
-        updatedTime_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int64 updated_time = 4;</code>
-       */
-      public Builder clearUpdatedTime() {
-        
-        updatedTime_ = 0L;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.GiftType)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.GiftType)
-    private static final com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType();
-    }
-
-    public static com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<GiftType>
-        PARSER = new com.google.protobuf.AbstractParser<GiftType>() {
-      public GiftType parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new GiftType(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<GiftType> parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<GiftType> getParserForType() {
-      return PARSER;
-    }
-
-    public com.kfzs.duanduan.proto.GiftTypeOuterClass.GiftType getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_GiftType_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_GiftType_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\017gift_type.proto\022\010protobuf\"Z\n\010GiftType\022" +
-      "\n\n\002id\030\001 \001(\005\022\026\n\016gift_type_name\030\002 \001(\t\022\024\n\014c" +
-      "reated_time\030\003 \001(\003\022\024\n\014updated_time\030\004 \001(\003B" +
-      "\031\n\027com.kfzs.duanduan.protob\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_GiftType_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_GiftType_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_GiftType_descriptor,
-        new java.lang.String[] { "Id", "GiftTypeName", "CreatedTime", "UpdatedTime", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

+ 0 - 757
app/src/main/java/com/kfzs/duanduan/proto/HotWordsOuterClass.java

@@ -1,757 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: hot_words.proto
-
-package com.kfzs.duanduan.proto;
-
-public final class HotWordsOuterClass {
-  private HotWordsOuterClass() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistryLite registry) {
-  }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
-  public interface HotWordsOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:protobuf.HotWords)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>int32 Id = 1;</code>
-     */
-    int getId();
-
-    /**
-     * <code>string HotWord = 2;</code>
-     */
-    java.lang.String getHotWord();
-    /**
-     * <code>string HotWord = 2;</code>
-     */
-    com.google.protobuf.ByteString
-        getHotWordBytes();
-
-    /**
-     * <code>int32 Number = 3;</code>
-     */
-    int getNumber();
-
-    /**
-     * <code>int32 Sort = 4;</code>
-     */
-    int getSort();
-  }
-  /**
-   * <pre>
-   * option java_outer_classname = "Hot_words";
-   * </pre>
-   *
-   * Protobuf type {@code protobuf.HotWords}
-   */
-  public  static final class HotWords extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:protobuf.HotWords)
-      HotWordsOrBuilder {
-    // Use HotWords.newBuilder() to construct.
-    private HotWords(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
-      super(builder);
-    }
-    private HotWords() {
-      id_ = 0;
-      hotWord_ = "";
-      number_ = 0;
-      sort_ = 0;
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-    private HotWords(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      int mutable_bitField0_ = 0;
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!input.skipField(tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 8: {
-
-              id_ = input.readInt32();
-              break;
-            }
-            case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              hotWord_ = s;
-              break;
-            }
-            case 24: {
-
-              number_ = input.readInt32();
-              break;
-            }
-            case 32: {
-
-              sort_ = input.readInt32();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.kfzs.duanduan.proto.HotWordsOuterClass.internal_static_protobuf_HotWords_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return com.kfzs.duanduan.proto.HotWordsOuterClass.internal_static_protobuf_HotWords_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords.class, com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords.Builder.class);
-    }
-
-    public static final int ID_FIELD_NUMBER = 1;
-    private int id_;
-    /**
-     * <code>int32 Id = 1;</code>
-     */
-    public int getId() {
-      return id_;
-    }
-
-    public static final int HOTWORD_FIELD_NUMBER = 2;
-    private volatile java.lang.Object hotWord_;
-    /**
-     * <code>string HotWord = 2;</code>
-     */
-    public java.lang.String getHotWord() {
-      java.lang.Object ref = hotWord_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        hotWord_ = s;
-        return s;
-      }
-    }
-    /**
-     * <code>string HotWord = 2;</code>
-     */
-    public com.google.protobuf.ByteString
-        getHotWordBytes() {
-      java.lang.Object ref = hotWord_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        hotWord_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    public static final int NUMBER_FIELD_NUMBER = 3;
-    private int number_;
-    /**
-     * <code>int32 Number = 3;</code>
-     */
-    public int getNumber() {
-      return number_;
-    }
-
-    public static final int SORT_FIELD_NUMBER = 4;
-    private int sort_;
-    /**
-     * <code>int32 Sort = 4;</code>
-     */
-    public int getSort() {
-      return sort_;
-    }
-
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (id_ != 0) {
-        output.writeInt32(1, id_);
-      }
-      if (!getHotWordBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hotWord_);
-      }
-      if (number_ != 0) {
-        output.writeInt32(3, number_);
-      }
-      if (sort_ != 0) {
-        output.writeInt32(4, sort_);
-      }
-    }
-
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (id_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(1, id_);
-      }
-      if (!getHotWordBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hotWord_);
-      }
-      if (number_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(3, number_);
-      }
-      if (sort_ != 0) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeInt32Size(4, sort_);
-      }
-      memoizedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords)) {
-        return super.equals(obj);
-      }
-      com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords other = (com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords) obj;
-
-      boolean result = true;
-      result = result && (getId()
-          == other.getId());
-      result = result && getHotWord()
-          .equals(other.getHotWord());
-      result = result && (getNumber()
-          == other.getNumber());
-      result = result && (getSort()
-          == other.getSort());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + ID_FIELD_NUMBER;
-      hash = (53 * hash) + getId();
-      hash = (37 * hash) + HOTWORD_FIELD_NUMBER;
-      hash = (53 * hash) + getHotWord().hashCode();
-      hash = (37 * hash) + NUMBER_FIELD_NUMBER;
-      hash = (53 * hash) + getNumber();
-      hash = (37 * hash) + SORT_FIELD_NUMBER;
-      hash = (53 * hash) + getSort();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * <pre>
-     * option java_outer_classname = "Hot_words";
-     * </pre>
-     *
-     * Protobuf type {@code protobuf.HotWords}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:protobuf.HotWords)
-        com.kfzs.duanduan.proto.HotWordsOuterClass.HotWordsOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return com.kfzs.duanduan.proto.HotWordsOuterClass.internal_static_protobuf_HotWords_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return com.kfzs.duanduan.proto.HotWordsOuterClass.internal_static_protobuf_HotWords_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords.class, com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords.Builder.class);
-      }
-
-      // Construct using com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        id_ = 0;
-
-        hotWord_ = "";
-
-        number_ = 0;
-
-        sort_ = 0;
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return com.kfzs.duanduan.proto.HotWordsOuterClass.internal_static_protobuf_HotWords_descriptor;
-      }
-
-      public com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords getDefaultInstanceForType() {
-        return com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords.getDefaultInstance();
-      }
-
-      public com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords build() {
-        com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords buildPartial() {
-        com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords result = new com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords(this);
-        result.id_ = id_;
-        result.hotWord_ = hotWord_;
-        result.number_ = number_;
-        result.sort_ = sort_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords) {
-          return mergeFrom((com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords other) {
-        if (other == com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords.getDefaultInstance()) return this;
-        if (other.getId() != 0) {
-          setId(other.getId());
-        }
-        if (!other.getHotWord().isEmpty()) {
-          hotWord_ = other.hotWord_;
-          onChanged();
-        }
-        if (other.getNumber() != 0) {
-          setNumber(other.getNumber());
-        }
-        if (other.getSort() != 0) {
-          setSort(other.getSort());
-        }
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private int id_ ;
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public int getId() {
-        return id_;
-      }
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public Builder setId(int value) {
-        
-        id_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 Id = 1;</code>
-       */
-      public Builder clearId() {
-        
-        id_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private java.lang.Object hotWord_ = "";
-      /**
-       * <code>string HotWord = 2;</code>
-       */
-      public java.lang.String getHotWord() {
-        java.lang.Object ref = hotWord_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          hotWord_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * <code>string HotWord = 2;</code>
-       */
-      public com.google.protobuf.ByteString
-          getHotWordBytes() {
-        java.lang.Object ref = hotWord_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          hotWord_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * <code>string HotWord = 2;</code>
-       */
-      public Builder setHotWord(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        hotWord_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string HotWord = 2;</code>
-       */
-      public Builder clearHotWord() {
-        
-        hotWord_ = getDefaultInstance().getHotWord();
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>string HotWord = 2;</code>
-       */
-      public Builder setHotWordBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        hotWord_ = value;
-        onChanged();
-        return this;
-      }
-
-      private int number_ ;
-      /**
-       * <code>int32 Number = 3;</code>
-       */
-      public int getNumber() {
-        return number_;
-      }
-      /**
-       * <code>int32 Number = 3;</code>
-       */
-      public Builder setNumber(int value) {
-        
-        number_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 Number = 3;</code>
-       */
-      public Builder clearNumber() {
-        
-        number_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private int sort_ ;
-      /**
-       * <code>int32 Sort = 4;</code>
-       */
-      public int getSort() {
-        return sort_;
-      }
-      /**
-       * <code>int32 Sort = 4;</code>
-       */
-      public Builder setSort(int value) {
-        
-        sort_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>int32 Sort = 4;</code>
-       */
-      public Builder clearSort() {
-        
-        sort_ = 0;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return this;
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:protobuf.HotWords)
-    }
-
-    // @@protoc_insertion_point(class_scope:protobuf.HotWords)
-    private static final com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords();
-    }
-
-    public static com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser<HotWords>
-        PARSER = new com.google.protobuf.AbstractParser<HotWords>() {
-      public HotWords parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-          return new HotWords(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser<HotWords> parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<HotWords> getParserForType() {
-      return PARSER;
-    }
-
-    public com.kfzs.duanduan.proto.HotWordsOuterClass.HotWords getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_protobuf_HotWords_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_protobuf_HotWords_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\017hot_words.proto\022\010protobuf\"E\n\010HotWords\022" +
-      "\n\n\002Id\030\001 \001(\005\022\017\n\007HotWord\030\002 \001(\t\022\016\n\006Number\030\003" +
-      " \001(\005\022\014\n\004Sort\030\004 \001(\005B\031\n\027com.kfzs.duanduan." +
-      "protob\006proto3"
-    };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
-    internal_static_protobuf_HotWords_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_protobuf_HotWords_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_protobuf_HotWords_descriptor,
-        new java.lang.String[] { "Id", "HotWord", "Number", "Sort", });
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}

文件差异内容过多而无法显示
+ 0 - 1898
app/src/main/java/com/kfzs/duanduan/proto/IndexAllbannerOuterClass.java


文件差异内容过多而无法显示
+ 0 - 1486
app/src/main/java/com/kfzs/duanduan/proto/IndexBannerGiftCenterOuterClass.java


文件差异内容过多而无法显示
+ 0 - 1422
app/src/main/java/com/kfzs/duanduan/proto/IndexBannerOuterClass.java


+ 0 - 0
app/src/main/java/com/kfzs/duanduan/proto/IndexGameOuterClass.java


部分文件因为文件数量过多而无法显示