billyyoyo %!s(int64=6) %!d(string=hai) anos
pai
achega
f26777d9b1

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

@@ -51,8 +51,8 @@ public class NetModule {
     public Retrofit provideRetrofit(OkHttpClient okhttpClient) {
         Retrofit retrofit = new Retrofit.Builder()
                 .client(okhttpClient)
-//                .baseUrl(SheepApp.getInstance().getConnectAddress().getAppUrl()+"v1/")
-                .baseUrl("http://ss.17xmy.com/v1/")
+                .baseUrl(SheepApp.getInstance().getConnectAddress().getAppUrl()+"v1/")
+//                .baseUrl("http://ss.17xmy.com/v1/")
 //                .baseUrl("http://192.168.0.109:8080/v1/")
 //                .baseUrl("http://10.8.240.180:8080/v1/")
                 .addConverterFactory(StringConverterFactory.create())

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWeb.java

@@ -106,7 +106,7 @@ public class FgtWeb extends BaseFgtWeb {
 //        mWebView = new WebView(SheepApp.getInstance());
         mWebView = new WebView(getActivity());
         webContainer.addView(mWebView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
-        ViewUtil.setImage(act_web_loading_iv, R.drawable.gif_sheep_loading);
+        ViewUtil.setGif(act_web_loading_iv, R.drawable.gif_sheep_loading);
 
         if (webParams == null) {
             LogUtil.println("程序出错了 没有初始化webParams");

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWebX5.java

@@ -107,7 +107,8 @@ public class FgtWebX5 extends BaseFgtWebX5 {
 //        mWebView = new WebView(SheepApp.getInstance());
         mWebView = new WebView(getActivity());
         webContainer.addView(mWebView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
-        ViewUtil.setImage(act_web_loading_iv, R.drawable.gif_sheep_loading);
+//        ViewUtil.setImage(act_web_loading_iv, R.drawable.gif_sheep_loading);
+        ViewUtil.setGif(act_web_loading_iv, R.drawable.gif_sheep_loading);
 
         if (webParams == null) {
             LogUtil.println("程序出错了 没有初始化webParams");

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -58,6 +58,8 @@ import android.widget.VideoView;
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.RequestBuilder;
 import com.bumptech.glide.load.DataSource;
+import com.bumptech.glide.load.DecodeFormat;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
 import com.bumptech.glide.load.engine.GlideException;
 import com.bumptech.glide.request.RequestListener;
 import com.bumptech.glide.request.RequestOptions;
@@ -116,6 +118,7 @@ import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.GlideApp;
 import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
 import com.umeng.socialize.ShareAction;
 import com.umeng.socialize.UMShareListener;
@@ -2038,6 +2041,14 @@ public class ViewUtil {
         }
     }
 
+    public static void setGif(ImageView imageView, int resId){
+        GlideApp.with(imageView)
+                .asGif()
+                .load(resId)
+                .format(DecodeFormat.PREFER_ARGB_8888)
+                .into(imageView);
+    }
+
     public static void setImage(ImageView imageView, Object object) {
         if (imageView != null) {
             if (object instanceof String) {

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java

@@ -450,7 +450,7 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
                 ViewUtil.setText(most_discount_tv, "+" + taskReleaseEty.getBonusText() + "元");
             }
         }
-        ViewUtil.setImage(act_hard_work_iv, R.drawable.hard_work_for_money);
+        ViewUtil.setGif(act_hard_work_iv, R.drawable.hard_work_for_money);
         updateBottom();
     }
 

+ 4 - 4
app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java

@@ -126,8 +126,8 @@ public class Config {
     public static final String KEY_SMALL_STATION_URL = "small_station_url";
     //small_station地址
     public static String SMALL_STATION_URL_SHEEP = "http://smallstation.9yan.io";
-//    public static String SMALL_STATION_URL_TEST = "http://10.8.230.28:8080";
-    public static String SMALL_STATION_URL_TEST = "http://10.8.240.180:8080";
+    public static String SMALL_STATION_URL_TEST = "http://10.8.230.28:8080";
+//    public static String SMALL_STATION_URL_TEST = "http://10.8.240.180:8080";
     //在数据库中表 config 中 配置 small_station_url后,可以进行设置 ,否则使用默认的值
     public static String SMALL_STATION_URL;
 
@@ -136,8 +136,8 @@ public class Config {
     }
 
     public static void initSMALL_STATION_URL() {
-//        SMALL_STATION_URL = TextUtils.equals(SheepApp.getInstance().getConnectAddress().name(), "sheep") ? SMALL_STATION_URL_SHEEP : SMALL_STATION_URL_TEST;
-        SMALL_STATION_URL = SMALL_STATION_URL_SHEEP;
+        SMALL_STATION_URL = TextUtils.equals(SheepApp.getInstance().getConnectAddress().name(), "sheep") ? SMALL_STATION_URL_SHEEP : SMALL_STATION_URL_TEST;
+//        SMALL_STATION_URL = SMALL_STATION_URL_SHEEP;
     }
 
     public static String getYFShopUrl(String sub) {

+ 2 - 2
app/src/main/res/layout/fgt_web.xml

@@ -25,8 +25,8 @@
 
     <ImageView
         android:id="@+id/act_web_loading_iv"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_width="79dp"
+        android:layout_height="86dp"
         android:layout_centerInParent="true" />
 
 </RelativeLayout>

+ 2 - 2
app/src/main/res/layout/fgt_web_x5.xml

@@ -25,8 +25,8 @@
 
     <ImageView
         android:id="@+id/act_web_loading_iv"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_width="79dp"
+        android:layout_height="86dp"
         android:layout_centerInParent="true" />
 
 </RelativeLayout>