光环助手V3.3 RELEASE(20180628-1630)测试问题汇总(前端)

This commit is contained in:
kehaoyuan
2018-06-29 15:24:23 +08:00
parent 76ea9a4ba4
commit 84eee14363
25 changed files with 198 additions and 46 deletions

View File

@ -6,6 +6,7 @@ import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
@ -37,11 +38,14 @@ import com.gh.gamecenter.databinding.KaifuDetailItemRowBinding;
import com.gh.gamecenter.entity.ApkEntity;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.entity.KaiFuCalendarEntity;
import com.gh.gamecenter.eventbus.EBReuse;
import com.gh.gamecenter.manager.PackageManager;
import com.lightgame.download.DownloadEntity;
import com.lightgame.download.FileUtils;
import com.lightgame.utils.Utils;
import org.greenrobot.eventbus.EventBus;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Locale;
@ -67,14 +71,25 @@ public class BindingAdapters {
KaifuDetailItemRowBinding binding = KaifuDetailItemRowBinding.bind(inflate);
binding.setIsCloseBottom(i == list.size());
binding.setIsReadyPatch(isReadyPatch);
binding.getRoot().setEnabled(isReadyPatch);
if (i == 0) {
binding.setIsTitle(true);
} else {
KaiFuCalendarEntity serverEntity = list.get(i - 1);
binding.setEntity(serverEntity);
binding.getRoot().setOnClickListener(v -> {
listener.onClick(v, serverEntity);
listener.onClick(v, isReadyPatch != null && isReadyPatch ? serverEntity : null);
});
// 滑动冲突处理
binding.getRoot().setOnTouchListener((v, event) -> {
if (list.size() > 5) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
EventBus.getDefault().post(new EBReuse("CalenderDown"));
} else if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) {
EventBus.getDefault().post(new EBReuse("CalenderCancel"));
}
}
return false;
});
}
view.addView(inflate);
@ -272,6 +287,9 @@ public class BindingAdapters {
@BindingAdapter({"downloadButton", "traceEvent"})
public static void setDownloadButton(DownloadProgressBar progressBar, GameEntity gameEntity, ExposureEvent traceEvent) {
if (gameEntity != null && TextUtils.isEmpty(gameEntity.getId())) {
gameEntity.setId(gameEntity.getLink());
}
// 判断是否显示按钮
if (gameEntity != null
&& Config.isShowDownload(gameEntity.getId())