Explorar el Código

add id lash_click_time

hanjing hace 6 años
padre
commit
191b907470

+ 2 - 4
app/src/main/java/com/sheep/gamegroup/helper/DownloadHelper.java

@@ -36,8 +36,6 @@ import static com.sheep.gamegroup.model.entity.TaskEty.TASK_TYPE_APP;
  */
 public class DownloadHelper {
 
-    private final static int LAST_CLICK_TIME = 101;
-
     private int downLoadType;
 
     /**
@@ -77,7 +75,7 @@ public class DownloadHelper {
             down_tv.setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View view) {
-                    Object obj = view.getTag(LAST_CLICK_TIME);
+                    Object obj = view.getTag(R.id.last_click_time);
                     if (obj != null) {
                         Long lastClickTime = (Long) obj;
                         if (System.currentTimeMillis() - lastClickTime < 3000) {
@@ -87,7 +85,7 @@ public class DownloadHelper {
                     if (callBack != null)
                         callBack.call(-1);
                     downloadApp(iTask);
-                    view.setTag(LAST_CLICK_TIME, new Long(System.currentTimeMillis()));
+                    view.setTag(R.id.last_click_time, new Long(System.currentTimeMillis()));
                 }
             });
         }

+ 1 - 0
app/src/main/res/values/kf_ids.xml

@@ -12,5 +12,6 @@
 
     <item type="id" name="statusbarutil_fake_status_bar_view" />
     <item type="id" name="statusbarutil_translucent_view" />
+    <item type="id" name="last_click_time" />
 
 </resources>