zeki лет назад: 5
Родитель
Сommit
baab3a0736

+ 0 - 5
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -34,7 +34,6 @@ import com.sheep.gamegroup.module.game.model.GiftTags;
 import com.sheep.gamegroup.module.game.model.SearchResp;
 import com.sheep.gamegroup.module.login.ChangePasswordAct;
 import com.sheep.gamegroup.module.login.LoginAct;
-
 import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.module.plugin.util.SheepPluginUtil;
 import com.sheep.gamegroup.module.qrcode.FaceWithQRActivity;
@@ -84,13 +83,11 @@ import org.afinal.simplecache.DataKey;
 import org.greenrobot.eventbus.EventBus;
 import org.xutils.ex.DbException;
 import rx.functions.Action1;
-
 import java.io.File;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
-
 import static com.sheep.gamegroup.model.entity.TaskEty.*;
 import static com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail.AUTO_DOWNLOAD;
 import static com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail.KEY_HAS_WELFARE;
@@ -212,7 +209,6 @@ public class Jump2View {
         }
     }
 
-
     /**
      * 跳到邀请赚钱页面
      *
@@ -225,7 +221,6 @@ public class Jump2View {
         UMConfigUtils.onEvent(UMConfigUtils.Event.SHEEP_TASK_INVITE);
     }
 
-
     /**
      * 跳到首页面前检查是否展示会长推广弹出框
      *

+ 28 - 37
app/src/main/java/com/sheep/gamegroup/view/activity/ActMain.java

@@ -273,37 +273,37 @@ public class ActMain extends BaseActYmPermissionCheck {
             }*/
             tabs.add(view);
             final int position = index;
-            view.setOnClickListener(v -> {
-                long currentTime = System.currentTimeMillis();
-                if ((currentTime - lastClickTime > MIN_CLICK_DELAY_TIME) && gifComplete) {
-                    int animResource = R.drawable.gif_bottom_home;
-                    int endResource = R.drawable.shouye_c;
-                    ImageView animTarget = view.findViewById(R.id.tab_1_iv);
-                    if (position == 0) {
-                        //首页
-                        animResource = R.drawable.gif_bottom_home;
-                        animTarget = view.findViewById(R.id.tab_1_iv);
-                        endResource = R.drawable.shouye_c;
-                    } else if (position == 1) {
-
-                    } else if (position == 2) {
-                        //游戏
-                        animResource = R.drawable.gif_bottom_game;
-                        animTarget = view.findViewById(R.id.tab_3_iv);
-                        endResource = R.drawable.youxi_c;
+            if (position != 1) {
+                view.setOnClickListener(v -> {
+                    long currentTime = System.currentTimeMillis();
+                    if ((currentTime - lastClickTime > MIN_CLICK_DELAY_TIME)) {
+                        int animResource = R.drawable.gif_bottom_home;
+                        int endResource = R.drawable.shouye_c;
+                        ImageView animTarget = view.findViewById(R.id.tab_1_iv);
+                        if (position == 0) {
+                            //首页
+                            animResource = R.drawable.gif_bottom_home;
+                            animTarget = view.findViewById(R.id.tab_1_iv);
+                            endResource = R.drawable.shouye_c;
+                        } else if (position == 2) {
+                            //游戏
+                            animResource = R.drawable.gif_bottom_game;
+                            animTarget = view.findViewById(R.id.tab_3_iv);
+                            endResource = R.drawable.youxi_c;
+                        }
+                        resetBottomTabImage();
+                        loadGifOnlyOnce(animResource, animTarget, endResource);
+                        lastClickTime = currentTime;
+                        switchFragment(position);
+                        checkWhichPage(position);
                     }
-                    resetBottomTabImage();
-                    loadGifOnlyOnce(animResource, animTarget, endResource);
-                    lastClickTime = currentTime;
-                    switchFragment(position);
-                    checkWhichPage(position);
-                }
-            });
+                });
+            }
             index++;
         }
         findViewById(R.id.tab_2).setOnClickListener(v -> {
             long currentTime = System.currentTimeMillis();
-            if ((currentTime - lastClickTime > MIN_CLICK_DELAY_TIME) && gifComplete) {
+            if ((currentTime - lastClickTime > MIN_CLICK_DELAY_TIME)) {
                 resetBottomTabImage();
                 playWXHBAnima((ImageView) v);
                 //loadGifOnlyOnce(R.drawable.gif_bottom_wxhb, (ImageView) v);
@@ -320,22 +320,14 @@ public class ActMain extends BaseActYmPermissionCheck {
 
     //播放微信红包动画
     private void playWXHBAnima(ImageView imageView) {
-        gifComplete = false;
         animationDrawable = (AnimationDrawable) imageView.getBackground();
+        animationDrawable.stop();
         animationDrawable.start();
-        Completable.timer(2300, TimeUnit.MILLISECONDS)
-                .doOnComplete(() -> {
-                    animationDrawable.stop();
-                    gifComplete = true;
-                }).subscribe();
-    }
 
-    //GIF是否播放完成
-    boolean gifComplete = true;
+    }
 
     //播放一次gif
     private void loadGifOnlyOnce(int gifResource, ImageView targetView, int endResource) {
-        gifComplete = false;
         Glide.with(ActMain.this)
                 .load(gifResource)
                 .skipMemoryCache(true)
@@ -360,7 +352,6 @@ public class ActMain extends BaseActYmPermissionCheck {
                                 public void onAnimationEnd(Drawable drawable) {
                                     super.onAnimationEnd(drawable);
                                     targetView.setImageResource(endResource);
-                                    gifComplete = true;
                                 }
                             });
                         }

+ 6 - 14
app/src/main/res/layout/fragment_sign_in.xml

@@ -62,9 +62,8 @@
                     android:id="@+id/cl_account_login"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="12dp"
                     android:visibility="gone"
-                    tools:visibility="visible"
+                    tools:visibility="gone"
                     app:layout_constraintTop_toTopOf="parent"
                     app:layout_constraintStart_toStartOf="parent"
                     app:layout_constraintEnd_toEndOf="parent">
@@ -130,7 +129,6 @@
                 <android.support.constraint.ConstraintLayout
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
-                        android:layout_marginBottom="16dp"
                         app:layout_constraintTop_toBottomOf="@id/password_box"
                         app:layout_constraintBottom_toBottomOf="parent"
                         android:layout_marginTop="16dp"
@@ -175,11 +173,10 @@
                     android:id="@+id/for_phone_container"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="12dp"
                     app:layout_constraintTop_toTopOf="parent"
                     app:layout_constraintStart_toStartOf="parent"
                     app:layout_constraintEnd_toEndOf="parent"
-                    tools:visibility="gone"
+                    tools:visibility="go"
                     android:visibility="visible">
 
                 <EditText
@@ -231,6 +228,7 @@
                         app:layout_constraintEnd_toEndOf="@+id/captcha_box"
                         app:layout_constraintTop_toTopOf="@+id/captcha_box"
                         app:layout_constraintBottom_toBottomOf="@+id/captcha_box"/>
+
             </android.support.constraint.ConstraintLayout>
 
             <LinearLayout
@@ -240,7 +238,6 @@
                     android:orientation="horizontal"
                     android:layout_marginStart="24dp"
                     android:layout_marginEnd="24dp"
-                    android:layout_marginTop="2dp"
                     android:layout_marginBottom="24dp">
 
                 <android.support.v7.widget.AppCompatCheckBox
@@ -248,15 +245,10 @@
                         android:layout_width="wrap_content"
                         android:layout_height="match_parent"
                         android:layout_marginStart="6dp"
-                        android:button="@drawable/drawable_selector_check"/>
-                <TextView
-                        android:id="@+id/tel_agreement_tv"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginStart="8dp"
-                        android:text="记住密码"
+                        android:text="  记住密码"
+                        android:textSize="15dp"
                         android:textColor="#4266B2"
-                        android:textSize="15dp"/>
+                        android:button="@drawable/drawable_selector_check"/>
 
                 <TextView
                         android:id="@+id/trouble_btn"