魅力程序猿

  • 首页
  • Java
  • Android
  • APP
    • 扑克计分器
    • Video Wallpaper
  • 联系我
  • 关于我
  • 资助
Android
Android

聊聊Android中intent-filter匹配规则

我们知道Activity的启动方式分为隐式和显式两种,至于两者的区别想必大家都已经很清楚了,显式需要明确的指定被启动对象的组件信息,比如包名和类名等,而隐式调用就不需要明确指定组件的信息。隐式调用就需要Intent能够匹配目标组件的IntentFilter中所设置的过滤信息,如果匹配不成功就不能启动目标Activity。 IntentFiler中过滤的信息包含action,category,data,如下边示例所示,本文也将围绕这个示例进行讲解。 <activity android:name="com.aoa…

2016年9月27日 0条评论 7748点热度 0人点赞 daozi 阅读全文
Android

研发本地化代码简要规范1

名词单复数避免写两种文案,需要按照安卓标准采用plural方式。 例子:    <plurals name="numberOfNotifications">        <item quantity="one">%d Notification</item>        <item quantity="few">%d Notifications</item>        <item quantity="other">%d Notificat…

2016年9月23日 1条评论 4310点热度 0人点赞 daozi 阅读全文
Android

NDK工程运行出错1

错误如下: Information:Gradle tasks [:app:assembleRelease] Error:Execution failed for task ':app:compileReleaseNdk'. > Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.…

2016年9月23日 4条评论 7838点热度 0人点赞 daozi 阅读全文
Android

Android Studio 2.2 正式稳定版发布

设计 布局编辑器 约束布局 布局检查(实验功能) 在Vector Asset Studio中支持PSD文件 构建 Jack编译的改进 支持Java 8 C ++ NDK的构建或CMake 清单文件合并查看器 构建高速缓存(实验功能) OpenJDK的支持 Instant Run的改进 开发 Firebase Plugin Updated Code Analysis & Lint checks 增强的可访问性支持 改进的C ++支持编辑和调试 2016年1月3日的IntelliJ更新 Samples浏览器 改…

2016年9月20日 1条评论 4950点热度 0人点赞 daozi 阅读全文
Android

Keep the screen awake throughout my activity (Android 屏幕常量)

介绍三种方法: 1、通过PowerManager.WakeLock实现: step 1:<uses-permission android:name="android.permission.WAKE_LOCK" /> step2: PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); PowerManager.WakeLock mWakeLock = pm.newWakeLock(PowerManager.SCR…

2016年7月7日 1条评论 5009点热度 0人点赞 daozi 阅读全文
Android

Timer

Timer download:https://play.google.com/store/apps/details?id=com.drivergenius.timer A free simple timer app that can be used anyway you see fit! The perfect Timer-beautifully clean, simple and reliable. Perfect for every timing situation (sports, games, work a…

2016年6月15日 0条评论 4449点热度 0人点赞 daozi 阅读全文
Android

Android Context作用域

虽然Context神通广大,但并不是随便拿到一个Context实例就可以为所欲为,它的使用还是有一些规则限制的。由于Context的具体实例是由ContextImpl类去实现的,因此在绝大多数场景下,Activity、Service和Application这三种类型的Context都是可以通用的。不过有几种场景比较特殊,比如启动Activity,还有弹出Dialog。出于安全原因的考虑,Android是不允许Activity或Dialog凭空出现的,一个Activity的启动必须要建立在另一个Activity的基础…

2016年5月24日 3条评论 5830点热度 0人点赞 daozi 阅读全文
Android

Game Screen Recorder(游戏录屏大师)

    Game Screen Recorder is a premium recorder app for game and screen. You can record your game video without root and easily share to your friends. What can Game Screen Recorder do? 1. Automatically identify the game on your phone without anytime l…

2016年4月14日 6条评论 6974点热度 0人点赞 daozi 阅读全文
Android

RadioGroup Checked Child

int _RadioButtonId = mRadioButtonGroup.getCheckedRadioButtonId(); View _RadioButton = mRadioButtonGroup.findViewById(_RadioButtonId ); int _Idx = mRadioButtonGroup.indexOfChild(_RadioButton); ((RadioButton)mRadioButtonGroup.getChildAt(_Idx)).setChecked(true); …

2016年3月31日 2条评论 4052点热度 0人点赞 daozi 阅读全文
Android

MediaRecorder no record audio

MediaRecorder进行录屏或摄像是怎么关闭声音?那是关闭Mic?不是的,这样根本不起作用。其实,最简单的方法就是不进行设置声音相关参数,就OK了。 pMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); pMediaRecorder.setAudioSamplingRate(44100); pMediaRecorder.setAudioEncodingBitRate(96000); pMediaRecorder.setAudioEncode…

2016年3月31日 2条评论 5128点热度 0人点赞 daozi 阅读全文
Android

RecyclerView IndexOutOfBoundsException: Inconsistency detected. Invalid item position

RecyclerView notifyItemRangeChanged(0, pChannels.size()); 出现下面异常: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{f1265e3 position=4 id=-1, oldPos=1, pLpos:1 scrap [attachedScrap] tmpDetached no paren…

2016年3月22日 6条评论 13933点热度 0人点赞 daozi 阅读全文
Android

Android 显示触摸操作代码

搜索关键字“Android 显示触摸操作代码”,结果都是进入设置页面的开发者模式下进行打开。其实,想用代码进行控制。那就搜索“android  show visual feedback for touches”,OK,这就可以找到想要的结果了。 代码如下: To enable show touches: Settings.System.putInt(context.getContentResolver(), "show_touches", 1); To disable show touches: Settings.…

2016年3月18日 0条评论 7685点热度 0人点赞 daozi 阅读全文
Android

PreferenceFragment public void onAttach(Context pContext) not work

public class FragmentSetting extends PreferenceFragment {} @Override public void onAttach(Context pContext) { //not working super.onAttach(pContext); if (pContext instanceof AppCompatActivity){ mActivity = (AppCompatActivity)pContext; } } @Override public void…

2016年3月17日 0条评论 4537点热度 0人点赞 daozi 阅读全文
Android

Starting EasterEgg intent in Android

adb: adb root adb shell am start -n android/com.android.internal.app.PlatLogoActivity is ok __________________________________________________________ intent: Intent _intent = new Intent(Intent.ACTION_MAIN); _intent.setClassName("android", "com.android.interna…

2016年3月2日 0条评论 5716点热度 0人点赞 daozi 阅读全文
Android

Android Normal and Dangerous Permissions

只是备注一下。 原文地址:http://developer.android.com/intl/zh-cn/guide/topics/security/permissions.html System permissions are divided into several protection levels. The two most important protection levels to know about are normal and dangerous permissions: Normal permi…

2016年3月2日 1条评论 4382点热度 0人点赞 daozi 阅读全文
1…45678
搜索
联系方式

QQ群:179730949
QQ群:114559024
欢迎您加入Android大家庭
本人QQ:136049925

赐我一丝安慰
给我一点鼓励

最新 热点 随机
最新 热点 随机
解决Android 7及以上Notification.contentView为null问题 彻底解决git命令免密问题 隐藏ScrollView、RecyclerView等滚动条和去掉滑动到边界阴影的方案 Android Studio 3.4 编译Release版本广点通所有广告不显示 Android中使用System的getProperty()方法及获取Android内核版本信息 弄清楚INSTALL FAILED CONFLICTING PROVIDER问题
Java静态代码块和非静态代码块 Android神经​​网络API(NNAPI) META-INF方式多渠道打包在Android 7.0系统提示安装找不到安装证书 在AndroidStudio中实现Gradle自定义插件 Java基础之Java异常 Android 中实现枚举的方案选择
最近评论
宝宝 发布于 7 年前(02月27日) 哈哈哈哈
GPU Mining 发布于 7 年前(02月19日) I am just starting to learn about all of this. Tha...
Timothynix 发布于 7 年前(02月08日) Your place is valueble for me. Thanks!… http:...
趣头条 发布于 7 年前(02月08日) 鸟儿叫,花儿笑,一年一季春来到!
xing1982 发布于 7 年前(02月04日) 不错不错!内容感觉好极了!

COPYRIGHT © 2023 魅力程序猿. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备15000477号