Explorar el Código

测试部分添加判断

zengjiebin hace 7 años
padre
commit
2ce4d9a6fc
Se han modificado 1 ficheros con 26 adiciones y 19 borrados
  1. 26 19
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

+ 26 - 19
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -2792,25 +2792,32 @@ public class CommonUtil {
     }
 
     public void showHomeList(Activity activity, List<HomeListEntity> child_list, View anchor) {
-        CharSequence copyText = StringUtils.getCopyText();
-        String copy;
-        if(copyText == null){
-            copy = "1;0;100;35;-50";
-        } else {
-            copy = copyText.toString();
-        }
-        String[] items = copy.split(";");
-        int i = 0;
-        int n = Integer.parseInt(items[i++]);
-        int p = Integer.parseInt(items[i++]);
-        int w = Integer.parseInt(items[i++]);
-        int x = Integer.parseInt(items[i++]);
-        int y = Integer.parseInt(items[i++]);
-        while (n != child_list.size()){
-            if(n > child_list.size())
-                child_list.add(child_list.get(0));
-            else
-                child_list.remove(0);
+        int p = 0;
+        int w = 100;
+        int x = 35;
+        int y = -50;
+
+        if(TestUtil.isDev()){//测试部分
+            CharSequence copyText = StringUtils.getCopyText();
+            String copy;
+            if(copyText == null){
+                copy = "1;0;100;35;-50";
+            } else {
+                copy = copyText.toString();
+            }
+            String[] items = copy.split(";");
+            int i = 0;
+            int n = Integer.parseInt(items[i++]);
+            p = Integer.parseInt(items[i++]);
+            w = Integer.parseInt(items[i++]);
+            x = Integer.parseInt(items[i++]);
+            y = Integer.parseInt(items[i++]);
+            while (n != child_list.size()){
+                if(n > child_list.size())
+                    child_list.add(child_list.get(0));
+                else
+                    child_list.remove(0);
+            }
         }
 
         View contentView = LayoutInflater.from(activity).inflate(R.layout.pop_hom_list_tip, null, false);