一丶关闭自己(进程)//1.采用停止虚拟机的办法(不太推荐)System.exit(0);//2.采用谷歌提供的apiandroid.os.Process.killProcess(android.os.Process.myPid());二丶关闭其它的进程//1.拿到进程的报名Stringname=etpackage.getText().toString().trim();//判断内容if(TextUtils...
分类:
移动开发 时间:
2015-07-13 18:53:07
阅读次数:
173
一丶传感器//拿到传感器管理器SensorManagersm=(SensorManager)getSystemService(SENSOR_SERVICE);//拿到手机里支持的所有的传感器List<Sensor>sensors=sm.getSensorList(Sensor.TYPE_ALL);for(inti=0;i<sensors.size();i++){Sensorsensor=sensors.get(i);System.out...
分类:
移动开发 时间:
2015-07-13 18:54:40
阅读次数:
165
平时在Android设备上调试程序,一般是将Android设备用数据线和PC机相连。
但是,在没有数据线的情况下也可以:
1、将PC机和Android设备连到同一网段。
2、获取Android设备的IP地址。
3、使用PC机控制终端,adb connect 192.168.1.111注:192.168.1.111为Android设备IP地址。...
分类:
移动开发 时间:
2015-07-13 18:53:43
阅读次数:
133
我的学习日志003:“文字长度--button与label的交互”程序
交代一下我做程序的工具:mac os x虚拟机10.9.3 Xcode6 百度^-^ 参考书iPhone30天精通(本书已经过时,但是还有一定的参考价值,可以引导正确的学习方向)。
没什么新的知识点,直接放步骤和代码。
XCode新建SingleVie...
分类:
移动开发 时间:
2015-07-13 18:50:22
阅读次数:
128
1.
选Devices
2.
3.
选中第二行
4.
保存在桌面
5.
右击选中显示包内容
6.
以上环境为x-code6.3.1...
分类:
移动开发 时间:
2015-07-13 18:50:28
阅读次数:
231
问题:
[2015-07-13 16:08:25 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/loopj/android/http/AsyncHttpClient$1;
[2015-07-13 16:08:25 - AhStu] Conversion to Dalvik format failed: U...
分类:
移动开发 时间:
2015-07-13 18:45:38
阅读次数:
402
1:app:tabSelectedTextColortab选中的字体颜色
2:app:tabTextColortab未被选中的字体颜色
3:app:tabIndicatorColorTab指示器下标的颜色...
分类:
移动开发 时间:
2015-07-13 18:40:52
阅读次数:
151
控制台执行出现如下报错
Application windows are expected to have a root view controller at the end of application launch
解决办法
在AppDelegate.m中的
- (BOOL)application:(UIApplication *)application...
分类:
移动开发 时间:
2015-07-13 18:40:09
阅读次数:
125
题意:
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,0,1,3...
分类:
移动开发 时间:
2015-07-13 18:40:16
阅读次数:
119
在读完扩展函数和默认值这篇文章之后,那么接下来要介绍什么呢?在本系列第一篇文章中我们说过,Kotlin使得Android开发更加简单,本文我们将进一步作介绍。自定义视图你应该还记得,在说到Kotlin的局限性时,我们提到了在Ko...
分类:
移动开发 时间:
2015-07-13 18:37:04
阅读次数:
164
从github下载下来之后运行,遇到的问题就是下面这个Error:Execution failed for task ':imagepipeline:ndk_build_bitmaps'.
> A problem occurred starting process 'command 'ndk-build.cmd''首先配置一下NDK的系统环境变量NDK_HOME,并且将其添加到PATH里面 不会的看...
分类:
移动开发 时间:
2015-07-13 18:33:46
阅读次数:
252
1.概述
在DeskClock(一)中介绍了该程序源码的迁出,现在开始分析该应用的源码,DeskClock主要有四个功能,闹钟,时钟,定时,和秒表,在这篇博客中主要分析DeskClock的入口和主UI上的逻辑结构,在后续的系列中会把这四个功能都串起来....
分类:
移动开发 时间:
2015-07-13 18:35:36
阅读次数:
195
部分代码如下: public void ShowAlertScreen(Context context,String titles,String content,String phone) { // 获取Service wm = (WindowManager) context.getSyste...
分类:
移动开发 时间:
2015-07-13 18:28:06
阅读次数:
255
android intent和intent action大全1.Intent的用法:(1)用Action跳转1、使用Action跳转,如果有一个程序的AndroidManifest.xml中的某一个 Activity的IntentFilter段中 定义了包含了相同的Action那么这个Intent就...
分类:
移动开发 时间:
2015-07-13 18:25:40
阅读次数:
120
一、Handler的定义:Handler主要接收子线程发送的数据, 并用此数据配合主线程更新UI,用来跟UI主线程交互用。比如可以用handler发送一个message,然后在handler的线程中来接收、处理该消息,以避免直接在UI主线程中处理事务导致影响UI主线程的其他处理工作,Android提...
分类:
移动开发 时间:
2015-07-13 18:19:53
阅读次数:
126
android知识杂记(二)
分类:
移动开发 时间:
2015-07-13 18:18:57
阅读次数:
125
Android性能优化典范原文链接: http://hukai.me/android-performance-patterns/JAN 17TH, 2015|COMMENTS2015新年伊始,Google发布了关于Android性能优化典范的专题,一共16个短视频,每个3-5分钟,帮助开发者创建更快...
分类:
移动开发 时间:
2015-07-13 18:16:43
阅读次数:
163