项目用到编译环境,与源码有些差异不能照搬,关键是连源码都没编译过,下面基本上是行网上照的各种自学成才的分享,病急乱投医了,都记在下面作为参照吧。1.验证是否编译正确,在终端执行emulator &(注:可进入${ANDROID_PRODUCT_OUT}目录,后执行emulator -image sy...
分类:
移动开发 时间:
2014-11-27 00:07:01
阅读次数:
247
1、创建一个定时器 ,以下是便利构造器方法,+ scheduledTimerWithTimeInterval:invocation:repeats:+ scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:+ timerWit...
分类:
移动开发 时间:
2014-11-27 00:04:57
阅读次数:
341
//uiview动画
//开始动画
[UIView beginAnimations:nil context:nil];
//运动的时间
[UIView setAnimationDuration:2.f];
//延时启动
[UIView setAnimationDelay:2];
//速度曲线(可以改变速度)
[UIView ...
分类:
移动开发 时间:
2014-11-26 22:45:38
阅读次数:
270
多线程 —单利
+ (SingleHandel *)shareModel
{
static dispatch_once_t onceQueue;
dispatch_once(&onceQueue, ^{
shareSingle = [[SingleHandel alloc] init];
});
return shareSingl...
分类:
移动开发 时间:
2014-11-26 22:44:34
阅读次数:
201
/**
* 用于建立于服务器之间通信的工具
*
*
*
*/
public class HttpClientAdapter {
private HttpClient client;
private HttpRequest request;
private HttpGet get;
private HttpPost post;
private HttpResponse...
分类:
移动开发 时间:
2014-11-26 22:44:37
阅读次数:
201
1、客户端代码
1.1第一个界面
public class MainActivity extends FragmentActivity {
private ViewPager viewPager;
private List items;
private List titles;
private MyFragmentPagerAdapter adapter;
@Override
p...
分类:
移动开发 时间:
2014-11-26 22:38:43
阅读次数:
365
如图1 图1问题:方法 NewStringUTF 不能被 eclipse定位(鼠标放在该方法上,ctrl + 左键,跳出一些包含 该方法的文件,看图2)解决思路:(具体思路看下文,参考中“推荐”)参考网上其他人的解决方案,基本2类:1. 去警告->...
分类:
移动开发 时间:
2014-11-26 22:36:14
阅读次数:
422
在iOS开发中,经常需要从后台数据中获取时间,但是此时后台返回的时间格式经常是一串类似"123456789"的数字,此数字是1970年开始截至到现在的秒数,此时我们需要将其转换为可以用的格式.模型中我定义了c_time属性,通过重写c_time的get方法中进行格式的转换.- (NSString *...
分类:
移动开发 时间:
2014-11-26 22:35:21
阅读次数:
325
Android中获取手机屏幕的高度和宽度,我们知道在onCreate方法中获取到的值都是为0的,有人说可以在onClick方法中获取值,这个也是个方法 ,但在onWindowFocusChanged方法中可以直接获取到,而且有的时候场景的需要,就不得不在Activity渲染完成后立马获取值,这时候o...
分类:
移动开发 时间:
2014-11-26 22:36:00
阅读次数:
309
疯狂IOS讲义这本书之前一直一直觉得没什么用,看了做不出像样的程序出来,但是经过几天的学习发现,没有一定的ios基础,做的程序永远都是在模仿他人的程序,把他人的代码复制 粘贴。。。为什么能够实现?原理 是什么?不懂。。。所以 必须懂原理,为什么?接下来就今天所学习的内容做一个小结;首先介绍一下KVO...
分类:
移动开发 时间:
2014-11-26 22:28:35
阅读次数:
300
通过反射来获取资源idtry{ String resName = "ic_launcher"; int resId = R.drawable.class.getDeclaredField(resName).getInt(R.drawable.class); imageView.setImageRes...
分类:
移动开发 时间:
2014-11-26 22:08:30
阅读次数:
173
在做ssh项目时,启动tomcat,出现了以下的错误
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanC...
分类:
移动开发 时间:
2014-11-26 21:04:00
阅读次数:
975
1、APN:android手机有wap和net两种方式。
用wap访问网络,要通过wap网关IP是(10.0.0.172 端口是80 )来访问外部资源。在这里有很多运营商的增值服务。
用net访问直接访问网络资源,速度快。
2、android手机和服务器通信,应该保持长连接。不然服务器定位不到手机,手机的是内网地址,服务器只是定位到网关的地址,(或运营商提供的ip)。
3、wifi是一种局...
分类:
移动开发 时间:
2014-11-26 21:01:06
阅读次数:
194
iOS基础8:自定义MyData/自定义SQLite用于网络判断,版本判断,图片缓存处理,下载或者上传的GET或POST请求,加密手段,.数据解析...
分类:
移动开发 时间:
2014-11-26 21:03:20
阅读次数:
438
分享一段ios数据库代码。包括创建、升级、增删查改。
里面的那些类不必细究,主要是数据库的代码100%可用。
数据库升级部分,使用switch,没有break,低版本一次向高版本修改。
数据库升级" style="margin:0px; padding:0px; border:0px none; list-style:none">
// DB.h
//iu...
分类:
移动开发 时间:
2014-11-26 21:01:09
阅读次数:
441
在项目中代码中尽可能少出现中文(注释除外),对此,就需要将字符串设置到string.xml中通常用法EXAMPLE 1: string.xml中配置:Hello! layout xml中使用方式为: code 中使用方式为:String string = getString(R.string.hel...
分类:
移动开发 时间:
2014-11-26 20:57:41
阅读次数:
233