码迷,mamicode.com
首页 > 移动开发
Android 监听锁屏/开屏事件
1. 两种方案 (1) 监听BroadcastReceiver (2)获取PowerManager事件 2.  BroadcastReceiver 2.1. 事件 总共有3个事件: Intent.ACTION_SCREEN_ON : 屏幕点亮 Intent.ACTION_SCREEN_OFF :屏幕关闭 Intent.ACTION_USER_PRESENT: 用...
分类:移动开发   时间:2015-04-15 19:44:23    阅读次数:200
android adapter报错The content of the adapter has changed but ListView did not receive a notification.
在Android编程中使用Adapter时,偶尔会出现如下错误: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, ...
分类:移动开发   时间:2015-04-15 19:41:05    阅读次数:146
Android -- Activity接收另一个Activity返回的数据
当我们在一个A(Activity)跳转到另外一个B(Activity)时,再由B返回A时,A如何接受返回的数据。我们在B页面加了一个输入框和按钮,当输入数据,点击按钮返回信息到A页面,先来看B页面Activity代码package com.example.testapp;import android.app.Activity; import android.content.Intent; impor...
分类:移动开发   时间:2015-04-15 19:41:30    阅读次数:171
【甘道夫】Spark1.3.0 Submitting Applications 官方文档精华摘要
引言 由于工作需要,即将拥抱Spark,曾经进行过相关知识的学习,现在计划详细读一遍最新版本Spark1.3的部分官方文档,一是复习,二是了解最新进展,三是为公司团队培训做储备。 欢迎转载,请注明出处: 原文URL:http://spark.apache.org/docs/latest/submitting-applications.html 该...
分类:移动开发   时间:2015-04-15 19:39:19    阅读次数:278
[Android]给EditText添加图文hint
原因: 有时候我们需要当没有文字的时候背景显示一个图文混合的背景提示,这时候如果采用控件叠加的做法效率会很低,所以我们可以采用重载View的onDraw方法 解决方案: 这个是效果,那个搜索框。 package com.finals.teltem.view; import android.content.Context; import android.content.res.Ty...
分类:移动开发   时间:2015-04-15 19:39:26    阅读次数:214
Android开发之DatePicker控件与TimePicker控件
DatePicker控件继承自FrameLayout类,日期选择控件的主要功能是向用户提供包含年、月、日的日期数据并允许用户对其修改。 TimePicker控件继承自FrameLayout类,向用户显示一天中的时间,允许用户对其进行修改。 DatePicker控件的方法: 1.init() 初始化DatePicker日期选择控件,设置初始显示的年份、月份、日...
分类:移动开发   时间:2015-04-15 19:38:12    阅读次数:168
The Implementation of RFCOMM in Android
Introduction     RFCOMM provides an emulation of serial cable line settings and status of an RS-232 serial port. RFCOMM is a simple transport protocol over L2CAP. So the protocol could supports up to...
分类:移动开发   时间:2015-04-15 19:38:08    阅读次数:124
android中SELINUX规则分析和语法简介
SELINUX是可以理解为一种android上面的安全机制,是有美国国家安全局和一些公司设计的一个针对linux的安全加强系统 我们可以通过配置SELINUX的相关policy,来定制自己的手机的一些权限,比如,我们可以完全让root用户没有任何的权限和user一样 在android里面,有两个类型,一种是文件,一种是进程。 针对这两种类型,我们可以先来看看他们的不同。 在android上面,adb shell之后进入手机,ps -Z可以查看当前进程所拥有的selinux的权限。...
分类:移动开发   时间:2015-04-15 19:33:25    阅读次数:424
据说年薪30万的Android程序员必须知道的帖子
Android中国开发精英②:207203815目前包括: Android开源项目第一篇——个性化控件(View)篇 包括ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar、TextView、Sc...
分类:移动开发   时间:2015-04-15 19:29:21    阅读次数:449
通过app的Activity名字启动他人app
使用app名字开打程序(activity),然后用Intent Action去打开某个app.思路:首相获取手机上安装的app应用列表,然后选中其中一个app,用Intent去打开。源代码如下: PackageManager packageManager = STBNetServerActivit....
分类:移动开发   时间:2015-04-15 19:27:10    阅读次数:161
[Android]ListView中PopupWindow的使用
懒得打字了,直接把这个类的代码贴上来public class MainActivity extends Activity { private TextView tv_shuju; private ListView listView; private ArrayAdapter ada...
分类:移动开发   时间:2015-04-15 19:27:28    阅读次数:194
[置顶] Android开发笔记(成长轨迹)
分类:开发学习笔记2013-06-21 09:4426043人阅读评论(5)收藏Android开发笔记1.控制台输出:called unimplemented OpenGL ES API调用了未实现的OpenGL ES API函数,一般由于导入的第三方库如地图库,里面有用到OpenGL,但是模拟器的...
分类:移动开发   时间:2015-04-15 19:25:23    阅读次数:332
查看 android 的使用内存 情况 和cpu 信息
一、利用Android API函数查看1.1 ActivityManager查看可用内存。ActivityManager.MemoryInfo outInfo = new ActivityManager.MemoryInfo();am.getMemoryInfo(outInfo);outInfo.a...
分类:移动开发   时间:2015-04-15 19:24:37    阅读次数:136
使用AppleScript播放指定时间的电影片段
要在公司中分享一个电影,为了能够简单的播放一些电影的片段,使用AppleScript和MPlayerX的seekto功能来播放指定时间段的电影。tell application "Finder" open document file "xxx.mkv" of folder "Movies" o...
分类:移动开发   时间:2015-04-15 19:20:01    阅读次数:160
Android xml资源文件中@、@android:type、@*、?、@+含义和区别
一.@代表引用资源 1.引用自定义资源。格式:@[package:]type/name android:text="@string/hello" 2.引用系统资源。格式:@android:type/name android:textColor="@android:color/opaque_red" ...
分类:移动开发   时间:2015-04-15 19:13:21    阅读次数:125
Android 应用测试总结
前提所有的功能分支已完成启动:1.启动入口:桌面正常启动,最近运行启动,所有程序列表中启动,锁屏快捷启动2.其他入口:从其他程序开启应用,从外部以文件形式打开应用(如果有)3.退回:从其他程序退回时回到被测应用,被测应用打开其他应用再从桌面图标启动以上需要交叉组合测试。4.异常启动:崩溃后启动,写文...
分类:移动开发   时间:2015-04-15 19:09:59    阅读次数:205
Android UI:ProgressBar 自定义进度条样式
以水平方向进度条为例,介绍如何自定义进度条。 1.在drawable文件夹下建立自己的进度条模版,右键drawable→new→Android XML file→layer list→自己起个名字(如progressBar_horizontal_1)代码如下 ...
分类:移动开发   时间:2015-04-15 19:10:20    阅读次数:156
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!