From c7f0f1ef7b740686f52e1e9c009816cc8b978560 Mon Sep 17 00:00:00 2001 From: kangshulong <1095887643@qq.com> Date: Mon, 16 Mar 2026 15:36:29 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8F=96=E6=B6=88=E5=BB=B6=E9=95=BF=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E6=97=B6=E9=97=B4=E5=8A=9E=E6=B3=95=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E7=84=A6=E7=82=B9=E9=97=AE=E9=A2=98=EF=BC=8C=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E7=BB=84=E4=BB=B6=E5=8F=91=E7=94=9F=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=8E=B7=E5=8F=96=E7=84=A6=E7=82=B9=E5=8D=B3?= =?UTF-8?q?=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/ik/mboxlauncher/ui/Launcher.java | 5 +++-- .../main/java/com/ik/mboxlauncher/view/TvRecyclerView.java | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/ik/mboxlauncher/ui/Launcher.java b/app/src/main/java/com/ik/mboxlauncher/ui/Launcher.java index 842e9f8..5b0c289 100644 --- a/app/src/main/java/com/ik/mboxlauncher/ui/Launcher.java +++ b/app/src/main/java/com/ik/mboxlauncher/ui/Launcher.java @@ -880,7 +880,7 @@ public boolean onGenericMotionEvent(MotionEvent event) { } }); - translateAnimation.setDuration(380); + translateAnimation.setDuration(300); translateAnimation.setFillAfter(true); content_view.startAnimation(translateAnimation); @@ -897,11 +897,12 @@ public boolean onGenericMotionEvent(MotionEvent event) { cuttentModel = MODEL_NORMAL; LogUtils.loge("coustom_view.getHeight():"+coustom_view.getLayoutParams().height); TranslateAnimation translateAnimation = new TranslateAnimation(0.0f, 0.0f,(float)(0 - coustom_view.getLayoutParams().height - gv_shortcut.getHeight()),0.0f); - translateAnimation.setDuration(380); + translateAnimation.setDuration(300); translateAnimation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { coustom_view.setTranslationZ(0); + grid_coustom_apps.disScrollFocus(); loadShortAppList(); coustom_view.clearFocus(); } diff --git a/app/src/main/java/com/ik/mboxlauncher/view/TvRecyclerView.java b/app/src/main/java/com/ik/mboxlauncher/view/TvRecyclerView.java index 1b2e250..68e7da4 100644 --- a/app/src/main/java/com/ik/mboxlauncher/view/TvRecyclerView.java +++ b/app/src/main/java/com/ik/mboxlauncher/view/TvRecyclerView.java @@ -129,6 +129,10 @@ public class TvRecyclerView extends RecyclerView { LogUtils.loge("TvRecyclerView gainFocus="+gainFocus); } } + //防止失去焦点还是会继续滚动再度获取焦点 + public void disScrollFocus(){ + hasResetFocus=false; + } @Override public boolean hasFocus() {