- 浏览: 550681 次
- 来自: -
博客专栏
-
libgdx 游戏开发
浏览量:11959
文章分类
- 全部博客 (171)
- OS (1)
- JavaScript (13)
- Struts (2)
- Regular Expression (1)
- Java (14)
- HTML (4)
- XML (1)
- Non-Relational Database (2)
- Miscellaneous (7)
- Lotus Notes (8)
- Algorithm (3)
- Web Analytics (6)
- Web (8)
- Perl (3)
- PHP (3)
- C & C++ (1)
- Shell (7)
- Google (1)
- Android (31)
- iPhone (1)
- SQL (1)
- HTML5 (3)
- jQuery (6)
- CSS (6)
- PostgreSQL (1)
- Design Patterns (1)
- Excel (1)
- Magento (4)
- jMeter (3)
- SEO (1)
- libgdx (5)
- Software (4)
- App (1)
- Game (1)
- Gradle (1)
- Linux (16)
- Ubuntu (4)
- Docker (2)
- Spring (2)
- Other (3)
- Directory Server (1)
- CentOS (1)
- Python (1)
- VCS (3)
- Database (1)
- Open Source (1)
最新评论
-
ls0609:
赞一个,支持下博主。
[原创] Android ListView 在右上角添加三角形图标和文字 -
love297:
不让别人商用,自己先商用起来了。
手机游戏开发展示 -
a851206:
你的有些类是哪里来的?我想研究一下你的程序,可是有些类没有代码 ...
[原创] Google Custom Search & Yahoo Boss Search | Web Search API 使用 -
ypppk:
BitmapFactory.Options options = ...
[原创] 连载 1 - 深入讨论 Android 关于高效显示图片的问题 - 如何高效的加载大位图 -
笑遍世界:
我也遇到了,弄清了其中原因,可参考我的博客:http://sm ...
[原创] 使用 jMeter 登录 Wordpress
原文地址:https://stackoverflow.com/a/27956263/6091500
亲测可用。
测试用机: 小米 2S Android 5.0
亲测可用。
测试用机: 小米 2S Android 5.0
HomeWatcher mHomeWatcher = new HomeWatcher(this); mHomeWatcher.setOnHomePressedListener(new OnHomePressedListener() { @Override public void onHomePressed() { ALog.i(TAG, "***** ===== onHomePressed() ===== *****"); } @Override public void onHomeLongPressed() { ALog.i(TAG, "***** ===== onHomeLongPressed() ===== *****"); } }); mHomeWatcher.startWatch();
public interface OnHomePressedListener { public void onHomePressed(); public void onHomeLongPressed(); }
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; /** * Created by Michael Leo <y@ho1ho.com> * Date: 2017/07/20 17:38 */ public class HomeWatcher { private static final String TAG = HomeWatcher.class.getSimpleName(); private Context mContext; private IntentFilter mFilter; private OnHomePressedListener mListener; private InnerRecevier mRecevier; public HomeWatcher(Context context) { mContext = context; mFilter = new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); } public void setOnHomePressedListener(OnHomePressedListener listener) { mListener = listener; mRecevier = new InnerRecevier(); } public void startWatch() { if (mRecevier != null) { mContext.registerReceiver(mRecevier, mFilter); } } public void stopWatch() { if (mRecevier != null) { mContext.unregisterReceiver(mRecevier); } } class InnerRecevier extends BroadcastReceiver { final String SYSTEM_DIALOG_REASON_KEY = "reason"; final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions"; final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps"; final String SYSTEM_DIALOG_REASON_HOME_KEY = "homekey"; final String SYSTEM_DIALOG_REASON_LONG_PRESS = "assist"; final String SYSTEM_DIALOG_REASON_VOICE_INTERACTION = "voiceinteraction"; @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) { String reason = intent.getStringExtra(SYSTEM_DIALOG_REASON_KEY); if (reason != null) { ALog.e(TAG, "action:" + action + ",reason:" + reason); if (mListener != null) { if (reason.equals(SYSTEM_DIALOG_REASON_HOME_KEY)) { mListener.onHomePressed(); } else if (reason.equals(SYSTEM_DIALOG_REASON_RECENT_APPS)) { mListener.onHomeLongPressed(); } else if (reason.equals(SYSTEM_DIALOG_REASON_LONG_PRESS)) { mListener.onHomeLongPressed(); } else if (reason.equals(SYSTEM_DIALOG_REASON_VOICE_INTERACTION)) { mListener.onHomeLongPressed(); } } } } } } }
发表评论
-
[转] DialogFragment Fragment already added
2017-10-25 11:16 2614原文地址:http://blog.csdn.net/u0129 ... -
Android Studio .gitignore
2017-10-16 15:44 837参考文献: https://github.com/github ... -
[转] How to detect incoming calls in an Android
2017-10-13 14:14 1170原文地址:https://stackoverflow.com/ ... -
[转] Android 检测电源按钮是否被按下
2017-10-11 12:55 959原文地址:https://stackoverflow.com/ ... -
[原创] Android Activity onNewIntent() 详解
2017-08-16 13:46 4719阅读难度:中 阅读前提: 1. 需要了解 Android 的生 ... -
[转] Android Webview: “Uncaught TypeError: Cannot read property 'getItem' of null
2017-08-14 15:09 2245原文地址:https://stackoverflow.com/ ... -
[原创] 使用 Vitamio 播放视频作为 Splash 时出现失真情况的解决方案
2017-08-02 09:10 1181目前在做关于视频及流媒体播放项目时,有这样一个需求,应用启动时 ... -
[转] Android: Expand/collapse animation
2017-07-31 14:57 1538原文地址:https://stackoverflow.com/ ... -
[原创] Android ListView 在右上角添加三角形图标和文字
2017-07-26 17:24 2682最终显示效果如下图,在右上角添加三角形图标并在图标内显示文字: ... -
[原创] 开启 Android TextView Marquee
2017-07-18 15:47 1779亲测可能。直接上代码。 测试机器:XiaoMi 2S Andr ... -
[原创] 小米手机无法真机调试
2017-07-06 09:10 6452系统环境: 小米 2S MIUI 版本:8.0.1.0(LXA ... -
了解数据绑定 - Data Binding Library
2017-06-22 15:31 898原文地址: -
How to play gif with Fresco
2017-06-22 14:00 630原文地址:https://stackoverflow.com/ ... -
设置 Toolbar(ActionBar) 上的按钮颜色
2017-06-22 08:11 2036原文地址: https://stackoverflow.com ... -
Display back button on action bar and back event
2017-06-22 08:00 715原文地址: https://stackoverflow.com ... -
Gradle 修改 Maven 仓库地址
2017-06-02 15:51 1628修改 Gradle Maven 仓库地址为阿里云镜像 修改根 ... -
[转] How to clear cookies and cache of webview on Android when not in webview?
2017-04-26 09:28 2168原文地址:http://stackoverflow.com/a ... -
[转] Android 在程序中如何动态的修改程序图标
2017-03-02 17:05 884http://stackoverflow.com/a/4150 ... -
[转] Android Libraries
2017-01-16 10:28 539原文地址: https://dzone.com/article ... -
[原创] Android 长按识别图中二维码 - Zxing
2017-01-10 09:27 6325前提: 本文使用了 ButterKnife 依赖库 开始环境 ...
相关推荐
检测Android设备的软导航栏,以便您知道哪个具有物理键(Home,Back,Menu),而哪些没有。 注意:该项目仅适用于Android,如果您使用它来检测软键是否被隐藏,它将无法正常工作。 拉请求是受欢迎的。 安装过程 从...
detect-inapp, 在移动应用程序的应用程序信息中,检测浏览器或者 检测 InApp检测浏览器或者应用程序的应用程序信息 代码示例import InApp from 'detect-inapp';const inapp = new InApp(navigato
image acquisition device to detect motion in the live video. It uses the optical flow estimation technique to estimate the motion vectors in each frame of the live video sequence
detect.tflite tensorflow lite android安卓 demo 模型 离线模型
Detect targets in an image in matlab
to detect foreground objects in single images1Institute of Mathematics of the Ro
Using Contours to Detect and Localize Junctions in Natural Images
SPD Serial presence detect
include('sstn/mobile_device_detect.php'); mobile_device_detect(false,true,true,'m/index.php',false); 2、上传附件中的mobile_device_detect.php到sstn目录。没有就在根目录新建一个。 说明。代码中的"m...
ssd_detect.pyssd_detect.pyssd_detect.pyssd_detect.pyssd_detect.py
a new automatic target detection (ATD) algorithm to detect targets such as military targets, vehicle detection, oil ... From this it is effective to detect targets in the real – time applications.
Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url "https://jitpack.io" } } } Step 2. Add the dependency dependencies { compile '...
yolov8系列--Detect known and unknown objects in the open wor
edge detect 边缘检测
Detect it Easy是一个多功能的PE-DIY工具,主要用于壳侦测。功能正日益完善,是不可多得的破解利器!支持文件直接拖放,可添加到右键菜单,非常方便!Die和peid一样可以加载插件。
Encode-Detect-1.01.tar.gz
Detect and track specific objects in a video using Optical Flow and Lucas Kanade Tracker An advanced guide full of real-world examples, helping you to build smart OpenCV Android applications Who This ...
You will then develop an application that will help you grasp Activities, Services and Broadcasts and their roles in Android development. Moving on, you will add user detecting classes ansd APIs such...
Laravel开发-detect 检测任何网站的CMS