Sfoglia il codice sorgente

删除部分不必要的库;
修复礼包详情界面中内容换行后显示不全的问题

zengjiebin 7 anni fa
parent
commit
28d0a74e85

+ 14 - 13
app/build.gradle

@@ -137,7 +137,7 @@ dependencies {
     implementation "com.android.support:design:$supportLibVersion"
     implementation 'com.android.support.constraint:constraint-layout:1.0.2'
     testImplementation 'junit:junit:4.12'
-    implementation 'com.google.code.gson:gson:2.8.2'
+//    implementation 'com.google.code.gson:gson:2.8.2'
     implementation('com.jcodecraeer:xrecyclerview:1.5.9') {
         //    implementation 'com.shark:screencapture:1.0.0'
         exclude group: 'com.android.support', module: 'design'
@@ -167,7 +167,7 @@ dependencies {
     implementation 'com.mylhyl:acp:1.1.7'
 
     implementation 'cn.yipianfengye.android:zxing-library:2.2'
-    implementation 'com.github.huburt-Hu:NewbieGuide:v1.2.0'
+//    implementation 'com.github.huburt-Hu:NewbieGuide:v1.2.0'
     debugImplementation 'com.android.support:multidex:1.0.1'
 
     //不要修改这里,相信我
@@ -189,15 +189,16 @@ dependencies {
 
     //retrofit
     implementation 'com.squareup.retrofit2:retrofit:2.4.0'
-    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
-    implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
+//    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
+    implementation 'org.ligboy.retrofit2:converter-fastjson-android:2.1.0'
+//    implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
 
     //    implementation 'com.squareup.retrofit2:adapter-rxjava2:+'
     implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
 
     //rxjava
-    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
-    implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
+    implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
+    implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
 
     //获取动态权限三方库
     implementation 'pub.devrel:easypermissions:1.2.0'
@@ -210,7 +211,7 @@ dependencies {
     //implementation 'com.umeng.sdk:analytics:latest.integration'
 
     //fast json
-    implementation 'com.alibaba:fastjson:1.2.47'
+    implementation 'com.alibaba:fastjson:1.2.48'
 
     //添加半袋米相关
     implementation(name: 'appstoreutils-201810101432', ext: 'aar')
@@ -232,15 +233,15 @@ dependencies {
     implementation 'com.zhy:okhttputils:2.6.2'
 
     //    implementation 'com.kf.framework:kf-utils:latest.integration@aar'
-    implementation 'com.kf.framework:kf-utils:1.4.5@aar'
+//    implementation 'com.kf.framework:kf-utils:1.4.5@aar'
 
     //    implementation 'com.kf.framework:volleyplus:latest.integration@aar'
-    implementation 'com.kf.framework:volleyplus:1.4.5@aar'
+//    implementation 'com.kf.framework:volleyplus:1.4.5@aar'
     implementation "com.android.support:support-annotations:$supportLibVersion"
     implementation "com.android.support:recyclerview-v7:$supportLibVersion"
 //    implementation project(':datashare')
-    implementation files('libs/jackson-core-2.2.1.jar')
-    implementation files('libs/jackson-dataformat-xml-2.1.2.jar')
+//    implementation files('libs/jackson-core-2.2.1.jar')
+//    implementation files('libs/jackson-dataformat-xml-2.1.2.jar')
     implementation 'io.reactivex:rxandroid:1.2.1'
     implementation 'com.github.ithedan:TextViewDrawable:v1.0'
 //    implementation 'com.github.zhangkexpz:LayoutScroll:v1.0'
@@ -284,8 +285,8 @@ dependencies {
     implementation "com.liulishuo.okdownload:okhttp:1.0.5"
 
     implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.2'
-
-    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
+//
+//    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
 
     implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
     //有米科技

BIN
app/libs/FileDownloader-1.0.0.aar


+ 4 - 2
app/src/main/java/com/sheep/gamegroup/di/modules/NetModule.java

@@ -20,7 +20,8 @@ import dagger.Provides;
 import okhttp3.OkHttpClient;
 import retrofit2.Retrofit;
 import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
-import retrofit2.converter.gson.GsonConverterFactory;
+import retrofit2.converter.fastjson.FastJsonConverterFactory;
+//import retrofit2.converter.gson.GsonConverterFactory;
 
 /**
  * Created by ljy on 2018/3/8.
@@ -50,7 +51,8 @@ public class NetModule {
                 .client(okhttpClient)
                 .baseUrl(SheepApp.getInstance().getConnectAddress().getAppUrl()+"v1/")
                 .addConverterFactory(StringConverterFactory.create())
-                .addConverterFactory(GsonConverterFactory.create(EntityUtils.gson))//
+                .addConverterFactory(FastJsonConverterFactory.create())
+//                .addConverterFactory(GsonConverterFactory.create(EntityUtils.gson))//
                 .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                 .build();
         return retrofit;

+ 0 - 27
app/src/main/java/com/sheep/gamegroup/model/util/HttpUtils.java

@@ -1,27 +0,0 @@
-package com.sheep.gamegroup.model.util;
-
-
-import com.sheep.jiuyan.samllsheep.BuildConfig;
-
-import java.util.concurrent.TimeUnit;
-
-import okhttp3.OkHttpClient;
-import okhttp3.logging.HttpLoggingInterceptor;
-
-/**
- * Created by ljy on 2018/3/8.
- */
-public class HttpUtils {
-    private HttpUtils() {}
-    public static final OkHttpClient client = new OkHttpClient.Builder()
-            .connectTimeout(20, TimeUnit.SECONDS)
-            .readTimeout(20,TimeUnit.SECONDS)
-            .addInterceptor(createHttpLoggingInterceptor())
-            .build();
-
-    private static HttpLoggingInterceptor createHttpLoggingInterceptor() {
-        HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
-        loggingInterceptor.setLevel(BuildConfig.DEBUG ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.NONE);
-        return loggingInterceptor;
-    }
-}

+ 5 - 3
app/src/main/java/com/sheep/gamegroup/view/activity/ActGcGameAppDetail.java

@@ -178,9 +178,11 @@ public class ActGcGameAppDetail extends BaseActivity {
         //加载游戏名字
         ViewUtil.setText(gc_game_app_detail_name, gameEntity.getApp().getName());
         //加载游戏标签
-        tagList.addAll(gameEntity.getApp().getTags());
-        ListUtil.removeNull(tagList);
-        recyclerView.getAdapter().notifyDataSetChanged();
+        if(gameEntity.getApp().getTags() != null) {
+            tagList.addAll(gameEntity.getApp().getTags());
+            ListUtil.removeNull(tagList);
+            recyclerView.getAdapter().notifyDataSetChanged();
+        }
         //下载按钮
         CommonUtil.getInstance().palyGameDetailBtnValue(this, gameEntity, gc_game_app_detail_bt2, 0);
         fgtGcPlayGameDetail.loadData(gameEntity);

+ 11 - 5
app/src/main/res/layout/act_gift_detail.xml

@@ -11,8 +11,10 @@
 
     <TextView
         android:layout_width="wrap_content"
-        android:layout_height="35dp"
+        android:layout_height="wrap_content"
         android:gravity="center"
+        android:paddingTop="12dp"
+        android:paddingBottom="12dp"
         android:paddingEnd="16dp"
         android:paddingStart="16dp"
         android:text="使用有效期"
@@ -57,10 +59,12 @@
     <TextView
         android:id="@+id/gift_detail_content"
         android:layout_width="wrap_content"
-        android:layout_height="40dp"
-        android:gravity="center"
+        android:layout_height="wrap_content"
+        android:paddingTop="14dp"
+        android:paddingBottom="14dp"
         android:paddingEnd="16dp"
         android:paddingStart="16dp"
+        android:lineSpacingExtra="10dp"
         android:text="元宝*88,士兵*60w"
         android:textColor="#ff2ebef2"
         android:textSize="12sp" />
@@ -85,10 +89,12 @@
     <TextView
         android:id="@+id/gift_detail_tip"
         android:layout_width="wrap_content"
-        android:layout_height="40dp"
-        android:gravity="center"
+        android:layout_height="wrap_content"
+        android:paddingTop="14dp"
+        android:paddingBottom="14dp"
         android:paddingEnd="16dp"
         android:paddingStart="16dp"
+        android:lineSpacingExtra="10dp"
         android:text="在兑换码界面输入即可领取"
         android:textColor="#ff2ebef2"
         android:textSize="12sp" />