魅力程序猿

  • 首页
  • Java
  • Android
  • APP
    • 扑克计分器
    • Video Wallpaper
  • 联系我
  • 关于我
  • 资助
道子
向阳而生
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条评论 4890点热度 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条评论 4318点热度 0人点赞 daozi 阅读全文
Android

Android Context作用域

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

2016年5月24日 3条评论 5703点热度 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条评论 6838点热度 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条评论 3937点热度 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条评论 5003点热度 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条评论 13719点热度 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条评论 7559点热度 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条评论 4432点热度 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条评论 5598点热度 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条评论 4294点热度 0人点赞 daozi 阅读全文
Android

Picasso vs Imageloader vs Fresco vs Glide

Picasso :https://github.com/square/picasso Imageloader :https://github.com/nostra13/Android-Universal-Image-Loader Fresco:https://github.com/facebook/fresco Glide :https://github.com/bumptech/glide 四个的对比图: Universal ImageLoader 是很早开源的图片缓存,在早期被很多应用使用。 Picasso 是…

2016年2月29日 2条评论 5763点热度 0人点赞 daozi 阅读全文
FFmpeg

移植FFmpeg到Android下使用中遇到 undefined reference to 'log2'

移植FFmpeg到Android下使用中遇到 undefined reference to 'log2',尝试了无数种方法,最后竟然是这个问题: 接下来,我会将移植FFmpeg到Android的步骤及注意的事项写成blog供大家参考。

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

MuiltDex 源码浅析

基于MuiltDex可以实现Hot Patch在不重新发布app的情况下,采用补丁的方式升级应用,用来快速解决一些线上的问题 google官方提供了MuiltDex的支持 compile 'com.android.support:multidex:1.0.0' github地址:https://github.com/casidiablo/multidex MuiltDex的基本原理是在打包的时候,将dex文件分拆成多个,并且在程序启动的时候动态加载,具体的使用方法可以参考 http://developer.andr…

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

解决ListView的Item会出现点击两次的问题

自定义一个监听器 NoDoubleItemClickListener,抽象一个 onNoDoubleItemClick 方法。 /** * NoDoubleItemClickListener * * Created by yuzhenbei on 2016/2/15. */ public abstract class NoDoubleItemClickListener implements AdapterView.OnItemClickListener{ /** 连击事件间隔 */ public static fi…

2016年2月15日 4条评论 5283点热度 0人点赞 daozi 阅读全文
12345
搜索
联系方式

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问题
Android的ClassLoader Android中怎么判断是Home键或非正常退出(进入后台)续 Java基础之Java线程 移植FFmpeg到Android下使用中遇到 undefined reference to 'log2' RadioGroup Checked Child Android Studio 3.0 正式版下载安装
最近评论
宝宝 发布于 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号