Android Home键监听

上传者: 38647517 | 上传时间: 2022-04-06 16:10:45 | 文件大小: 2.5MB | 文件类型: ZIP
之前项目从未对Home键做过监听,因为也不需要,但是这次的项目遇到Home键的问题。一个页面要定时捞数据,当Home键退到桌面,等会再进去,就容易蹦。这个问题我首先想到的Home,试着运行,发现没有问题,但是第二次再按Home键就直接崩溃了。经过我改进,现在已经OK。

文件下载

资源详情

[{"title":"( 55 个子文件 2.5MB ) Android Home键监听","children":[{"title":"ApkDemo","children":[{"title":"AndroidManifest.xml <span style='color:#111;'> 871B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"layout","children":[{"title":"fragment_main.xml <span style='color:#111;'> 714B </span>","children":null,"spread":false},{"title":"activity_main.xml <span style='color:#111;'> 450B </span>","children":null,"spread":false}],"spread":true},{"title":"values-w820dp","children":[{"title":"dimens.xml <span style='color:#111;'> 381B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-ldpi","children":null,"spread":false},{"title":"menu","children":[{"title":"main.xml <span style='color:#111;'> 386B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 334B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 12.22KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 391B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 24.20KB </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 224B </span>","children":null,"spread":false},{"title":"dimens.xml <span style='color:#111;'> 220B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 697B </span>","children":null,"spread":false}],"spread":true}],"spread":false},{"title":"src","children":[{"title":"com","children":[{"title":"xiaomolongstudio","children":[{"title":"apkdemo","children":[{"title":"MainActivity.java <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"HomeWatcher.java <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"classes","children":[{"title":"com","children":[{"title":"xiaomolongstudio","children":[{"title":"apkdemo","children":[{"title":"HomeWatcher.class <span style='color:#111;'> 1.93KB </span>","children":null,"spread":false},{"title":"MainActivity$1.class <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"HomeWatcher$OnHomePressedListener.class <span style='color:#111;'> 313B </span>","children":null,"spread":false},{"title":"BuildConfig.class <span style='color:#111;'> 365B </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 773B </span>","children":null,"spread":false},{"title":"MainActivity.class <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 470B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 370B </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 461B </span>","children":null,"spread":false},{"title":"HomeWatcher$InnerRecevier.class <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 456B </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 502B </span>","children":null,"spread":false},{"title":"R$menu.class <span style='color:#111;'> 418B </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 491B </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 437B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"dexedLibs","children":[{"title":"gson-2.2.4-8382017a54d950f636ef164480a3df32.jar <span style='color:#111;'> 67.88KB </span>","children":null,"spread":false},{"title":"xUtils-2.5.5-39f9ee2e1de7411b7100a19340a265ef.jar <span style='color:#111;'> 111.59KB </span>","children":null,"spread":false},{"title":"android-support-v4-10b9d9e6dbb6bc2ed8d85da1e3d0d2b6.jar <span style='color:#111;'> 236.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"AndroidManifest.xml <span style='color:#111;'> 871B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"crunch","children":[{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.04KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 5.82KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 9.14KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 17.47KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"jarlist.cache <span style='color:#111;'> 120B </span>","children":null,"spread":false},{"title":"R.txt <span style='color:#111;'> 31.97KB </span>","children":null,"spread":false},{"title":"classes.dex <span style='color:#111;'> 1.55MB </span>","children":null,"spread":false},{"title":"ApkDemo.apk <span style='color:#111;'> 450.20KB </span>","children":null,"spread":false},{"title":"resources.ap_ <span style='color:#111;'> 40.41KB </span>","children":null,"spread":false}],"spread":true},{"title":".classpath <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"assets","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 563B </span>","children":null,"spread":false},{"title":"ic_launcher-web.png <span style='color:#111;'> 50.19KB </span>","children":null,"spread":false},{"title":"libs","children":[{"title":"xUtils-2.5.5.jar <span style='color:#111;'> 275.50KB </span>","children":null,"spread":false},{"title":"gson-2.2.4.jar <span style='color:#111;'> 185.96KB </span>","children":null,"spread":false},{"title":"android-support-v4.jar <span style='color:#111;'> 633.13KB </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 843B </span>","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"xiaomolongstudio","children":[{"title":"apkdemo","children":[{"title":"R.java <span style='color:#111;'> 2.66KB </span>","children":null,"spread":false},{"title":"BuildConfig.java <span style='color:#111;'> 170B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"2014071601.gif <span style='color:#111;'> 133.36KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明