zengjiebin лет назад: 8
Родитель
Сommit
5ca2ec1e7e

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

@@ -955,6 +955,7 @@ public class Jump2View {
         Intent intent = new Intent(context, SignCardAct.class);
         intent.putExtra("balance",o.toString());
         context.startActivity(intent);
+        UMConfigUtils.Event.PUNCH.onEvent();
     }
 
 
@@ -966,6 +967,7 @@ public class Jump2View {
     public void goSignRankingsAct(Context context, Object o){
         Intent intent = new Intent(context, SignRankingsAct.class);
         context.startActivity(intent);
+        UMConfigUtils.Event.PUNCH_RANKING_LIST.onEvent();
     }
 
 
@@ -977,6 +979,7 @@ public class Jump2View {
     public void goSignRecordAct(Context context, Object o){
         Intent intent = new Intent(context, SignRecordAct.class);
         context.startActivity(intent);
+        UMConfigUtils.Event.PUNCH_RECORD.onEvent();
     }
 
     /**

+ 7 - 0
app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java

@@ -62,6 +62,13 @@ public class UMConfigUtils {
         SHEEP_RESUME            ,//小绵羊进入前台 5039
         SHEEP_PAUSE            ,//小绵羊进入后台 5040
         SHEEP_STOP            ,//退出小绵羊 5041
+        PUNCH            ,//点击打卡赚钱 5042
+        PUNCH_SIGN_UP            ,//点击报名 5043
+        PUNCH_PUNCH            ,//点击打卡 5044
+        PUNCH_RECORD            ,//点击战绩 5045
+        PUNCH_RANKING_LIST            ,//点击本月排行榜 5046
+        PUNCH_ACCUMULATIVE_LIST            ,//选择累计打卡 5047
+        PUNCH_CONTINUATION           ,//选择连续打卡 5048
         ;
         private String key;
         Event(String key){

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

@@ -227,7 +227,7 @@ public class ViewUtil {
         if(window != null) {
             android.view.WindowManager.LayoutParams p = window.getAttributes();
             p.height = WindowManager.LayoutParams.WRAP_CONTENT;
-            p.width = G.WIDTH - 40;
+            p.width = WindowManager.LayoutParams.MATCH_PARENT;
             dialog.getWindow().setAttributes(p);     //设置生效
         }
         iv.setOnClickListener(new View.OnClickListener() {
@@ -259,7 +259,7 @@ public class ViewUtil {
         if(window != null) {
             android.view.WindowManager.LayoutParams p = window.getAttributes();
             p.height = WindowManager.LayoutParams.WRAP_CONTENT;
-            p.width = G.WIDTH - 40;
+            p.width = WindowManager.LayoutParams.MATCH_PARENT;
             dialog.getWindow().setAttributes(p);     //设置生效
         }
         iv.setOnClickListener(new View.OnClickListener() {
@@ -299,7 +299,7 @@ public class ViewUtil {
         if(window != null) {
             android.view.WindowManager.LayoutParams p = window.getAttributes();
             p.height = WindowManager.LayoutParams.WRAP_CONTENT;
-            p.width = G.WIDTH - 40;
+            p.width = WindowManager.LayoutParams.MATCH_PARENT;
             dialog.getWindow().setAttributes(p);     //设置生效
         }
         iv.setOnClickListener(new View.OnClickListener() {

+ 3 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/SignCardAct.java

@@ -21,6 +21,7 @@ import com.sheep.gamegroup.model.entity.PunchAndSign;
 import com.sheep.gamegroup.presenter.SignCardContract;
 import com.sheep.gamegroup.presenter.SignCardPresenter;
 import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.UMConfigUtils;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -238,6 +239,7 @@ public class SignCardAct extends BaseActivity implements SignCardContract.View {
 
     private void trySignUp() {
         if(Float.valueOf(balance) >= 1){
+            UMConfigUtils.Event.PUNCH_PUNCH.onEvent();
             presenter.goSignUp();
         }else {
             ViewUtil.showSignTimeAlert(activity, "抱歉,你的余额不足,请先去充值再来参与打卡哦!", "去充值、好的", new View.OnClickListener() {
@@ -259,6 +261,7 @@ public class SignCardAct extends BaseActivity implements SignCardContract.View {
                 break;
             case 3:
                 presenter.goSignPunch();
+                UMConfigUtils.Event.PUNCH_SIGN_UP.onEvent();
                 break;
             case 4:
                 ViewUtil.showSignTimeAlert(activity, "今日打卡活动已结束,请先去报名,明日再来哦!");

+ 21 - 16
app/src/main/java/com/sheep/gamegroup/view/activity/SignRankingsAct.java

@@ -12,6 +12,7 @@ import android.widget.TextView;
 
 import com.kfzs.duanduan.fragment.FgtSignRankings;
 import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.util.UMConfigUtils;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
@@ -112,22 +113,6 @@ public class SignRankingsAct extends BaseActivity {
         }
     }
 
-    private void selectRight() {
-        signRlLjdl.setBackgroundResource(R.drawable.shape_sign_rankings_left_normal);
-        signTvLjdl.setTextColor(ContextCompat.getColor(activity,R.color.black));
-        signRlLxdl.setBackgroundResource(R.drawable.shape_sign_rankings_right_hold);
-        signTvLxdl.setTextColor(ContextCompat.getColor(activity,R.color.white));
-
-        Drawable drawable2= getResources().getDrawable(R.drawable.sign_lxdk_w_bg);
-        drawable2.setBounds(0, 0, drawable2.getMinimumWidth(), drawable2.getMinimumHeight());
-        signTvLxdl.setCompoundDrawables(drawable2,null,null,null);
-
-
-        Drawable drawable3= getResources().getDrawable(R.drawable.sign_ljdk_bg);
-        drawable3.setBounds(0, 0, drawable3.getMinimumWidth(), drawable3.getMinimumHeight());
-        signTvLjdl.setCompoundDrawables(drawable3,null,null,null);
-    }
-
     private void selectLeft() {
         signRlLjdl.setBackgroundResource(R.drawable.shape_sign_rankings_left_hold);
         signTvLjdl.setTextColor(ContextCompat.getColor(activity,R.color.white));
@@ -143,5 +128,25 @@ public class SignRankingsAct extends BaseActivity {
         Drawable drawable1= getResources().getDrawable(R.drawable.sign_ljdk_w_bg);
         drawable1.setBounds(0, 0, drawable1.getMinimumWidth(), drawable1.getMinimumHeight());
         signTvLjdl.setCompoundDrawables(drawable1,null,null,null);
+
+        UMConfigUtils.Event.PUNCH_ACCUMULATIVE_LIST.onEvent();
     }
+    private void selectRight() {
+        signRlLjdl.setBackgroundResource(R.drawable.shape_sign_rankings_left_normal);
+        signTvLjdl.setTextColor(ContextCompat.getColor(activity,R.color.black));
+        signRlLxdl.setBackgroundResource(R.drawable.shape_sign_rankings_right_hold);
+        signTvLxdl.setTextColor(ContextCompat.getColor(activity,R.color.white));
+
+        Drawable drawable2= getResources().getDrawable(R.drawable.sign_lxdk_w_bg);
+        drawable2.setBounds(0, 0, drawable2.getMinimumWidth(), drawable2.getMinimumHeight());
+        signTvLxdl.setCompoundDrawables(drawable2,null,null,null);
+
+
+        Drawable drawable3= getResources().getDrawable(R.drawable.sign_ljdk_bg);
+        drawable3.setBounds(0, 0, drawable3.getMinimumWidth(), drawable3.getMinimumHeight());
+        signTvLjdl.setCompoundDrawables(drawable3,null,null,null);
+
+        UMConfigUtils.Event.PUNCH_CONTINUATION.onEvent();
+    }
+
 }

+ 1 - 1
app/src/main/res/layout/sign_card_layout.xml

@@ -217,7 +217,7 @@
                     android:layout_gravity="center_horizontal"
                     android:layout_marginTop="10dp"
                     android:layout_marginBottom="@dimen/content_padding_10"
-                    android:background="@drawable/sp_bg_gradient_rectangle_yellow"
+                    android:background="@drawable/selector_button_full_main_small"
                     android:clickable="true"
                     android:enabled="false"
                     android:gravity="center"