码迷,mamicode.com
首页 > 移动开发
android-上下文菜单的创建 - 随心
//Menu设置//覆盖两个方法onCreateOptionsMenu(Menu menu)、onOptionsItemSelected(MenuItem Item)//onCreateOptionsMenu:在该函数中创建Menu//onOptionsItemSelected:当选中某个Menu时...
分类:移动开发   时间:2015-07-01 17:48:16    阅读次数:166
【转】Android兼容性测试CTS Verifier-环境搭建、测试执行、结果分析
原文网址:http://www.cnblogs.com/zh-ya-jing/p/4452675.htmlCTS Verifier算是CTS的一部分,需要手动进行,主要用于测试那些自动测试系统无法测试的功能,比如相机、传感器等。由于硬件配置或其他原因,不同手机上部分测试项目被隐藏,也就是说CTS V...
分类:移动开发   时间:2015-07-01 17:49:06    阅读次数:224
Android中使用WebView, WebChromeClient和WebViewClient加载网页
在android应用中,有时要加载一个网页,如果能配上一个进度条就更好了,而android 中提供了其很好的支持,其中webView的一系列用法,比如webView.getSettings().setJavaScriptEnabled(true); //设置可以使用javascriptwebView...
分类:移动开发   时间:2015-07-01 17:47:06    阅读次数:281
转-android开发中如何结束所有的activity
每一个activity都有自己的生命周期,被打开了最终就要被关闭。 四种结束当前的activity方法Java代码: //关闭当前activity方法一finish();//关闭当前界面方法二android.os.Process.killProcess(android.os.Process.myPi...
分类:移动开发   时间:2015-07-01 17:49:09    阅读次数:126
Android 图片在SD卡及包下的存储
public class FileBitmap { /** * 获取sd卡中的bitmap,bitmap可见 * * @param bitmap * 读取bitmap的路径 * @return bitmap */ p...
分类:移动开发   时间:2015-07-01 17:45:16    阅读次数:143
转-android.app.Fragment$InstantiationException 解决办法
在实际的开发中,我遇到过两次android.app.Fragment$InstantiationException报错。 其中一次报错,根据报错提示 “make sure class name exists, is public, and has an empty constructor that ...
分类:移动开发   时间:2015-07-01 17:44:01    阅读次数:126
使用AutoMapper
一、AutoMapper初探:[参考Using AutoMapper: Getting Started]1.新建空的ASP.NET MVC项目。2.在Models文件夹添加类: public class Book { public string Title { get; s...
分类:移动开发   时间:2015-07-01 17:43:37    阅读次数:328
iOS 易忘的字符串方法
1.从索引x位置开始取y个长度字节NSString * str=@"1234567890";NSString * str1=[str substringWithRange:NSMakeRange(x, y)];2.需要个x位的字符串,当前获取的字符串y不够x位,在前面补0的方法NSString * ...
分类:移动开发   时间:2015-07-01 17:44:02    阅读次数:361
关于android使用ksoap2报Caused by: java.lang.ClassCastException: org.ksoap2.SoapFault cannot be cast to org.ksoap2.serialization.SoapObject
Caused by: java.lang.ClassCastException: org.ksoap2.SoapFault cannot be cast to org.ksoap2.serialization.SoapObject报这种类似的错误的,困扰了我挺久。偶尔报不是一直报。原来是少了一个判断...
分类:移动开发   时间:2015-07-01 17:40:50    阅读次数:360
android点滴之HandlerThread的用法
转载请注明出处:http://blog.csdn.net/lskshz/article/details/25364909一.介绍HandlerThread继承自Thread,当线程开启时,也就是它run方法运行起来后,线程同时创建了一个含有消息队列的Looper,并对外提供自己这个Looper对象的...
分类:移动开发   时间:2015-07-01 17:40:25    阅读次数:139
【转】android cts测试方法及步骤
原文网址:http://blog.csdn.net/shi_xin/article/details/422626751.CTS下载打开下面网址,http://source.android.com/compatibility/downloads.html以android5.0为例,进入页面后,点击An...
分类:移动开发   时间:2015-07-01 17:36:46    阅读次数:212
Android Toast
//Toast.LENGTH_SHORT == 0 Toast.makeText( Activity1.this , "点击了" , Toast.LENGTH_SHORT ).show(); Toast.makeText( Activity1.th...
分类:移动开发   时间:2015-07-01 17:37:04    阅读次数:159
iOS开发总结(A0) - Info.plist
Bundle identifier:app 唯一的identifier,必须与itune connection 中的一致Main storyboard file base name (iPad):如果ipad 有不同的storyboard 在这里设置to be continued
分类:移动开发   时间:2015-07-01 17:34:14    阅读次数:135
Android开发者必须深入学习的10个应用开源项目
Android开发又将带来新一轮热潮,很多开发者都投入到这个浪潮中去了,创造了许许多多相当优秀的应用。其中也有许许多多的开发者提供了应用开源项 目,贡献出他们的智慧和创造力。学习开源代码是掌握技术的一个最佳方式。下面推荐几个应用开源项目,这些项目不仅提供了优秀的创意,也可以直接掌握 Android内...
分类:移动开发   时间:2015-07-01 17:33:14    阅读次数:135
Android开发图片分辨率问题解决方案
dpi是什么呢?dpi是“dot per inch”的缩写,每英寸像素数。四种密度分类: ldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high)一般情况下的普通屏幕:ldpi是120,mdpi是160,hdpi是240,xhdpi...
分类:移动开发   时间:2015-07-01 17:33:59    阅读次数:149
关于android WebViewClient的方法解释
1、public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } 在点击请求的是链接是才会调用,重写此方法返回true表明点击...
分类:移动开发   时间:2015-07-01 17:35:00    阅读次数:227
淘宝(阿里百川)手机客户端开发日记第六篇 Service详解(四)
DEMO1:在Activity里声明一个回调方法,当service完成任务后,调用这个回调方法。首先,我们先继承service,来创建服务,代码如下: 1 package com.example.service; 2 3 import android.app.Service; 4 import a....
分类:移动开发   时间:2015-07-01 17:34:17    阅读次数:235
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!