摘要: IntentServiceIntentService is a base class forServices that handle asynchronous requests (expressed asIntents) on demand. Clients send requests throughstartService(Intent)calls; the service is started as needed, handles each Intent in turn using a worker thread, and stops itself when it runs out of 阅读全文
posted @ 2012-07-04 13:29 誑逩の蝸犇 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 创建和删除快捷方式主要是Launcher完成的,我们只是把快捷方式的名称、图标、关联的activity信息传递给Launcher而已。我们构造好了Intent信息后,将其以广播的方式发送出去,Launcher会帮忙完成创建、删除,并且会弹出一个Toast。1.下面是系统中Launcher的Manifest文件。从中可以看到它定义了创建和删除快捷方式的permission,因此我们必须在自己的应用中声明权限才行。com.android.launcher.permission.INSTALL_SHORTCUT 创建权限com.android.launcher.permission.UNINSTA. 阅读全文
posted @ 2012-06-18 16:06 誑逩の蝸犇 阅读(6746) 评论(4) 推荐(0) 编辑
摘要: Android进程的生命周期绿水本无忧,因风皱面;青山原不老,为雪白头。Foreground进程a. 进程运行一个与用户交互的Activity(onResume方法被调用)b. 进程正在运行BroadcastReceiver(onReceive方法被调用)c. 进程有一个Service正在运行,并且Service的某个回调函数正在运行Visible进程a.对用户可见,但不在最前端(onPause方法被调用)Service进程a.使用startService()方法启动的服务Background进程a. 拥有一个用户不可见的Activity(onStop方法被调用)注:这种进程被放入LRU(Le 阅读全文
posted @ 2011-10-01 18:19 誑逩の蝸犇 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 帧动画实现很简单 --> 代码中使用begin开始,stop结束动画 FrameAnim.Begin();Fr... 阅读全文
posted @ 2014-08-27 17:56 誑逩の蝸犇 阅读(662) 评论(0) 推荐(0) 编辑
摘要: /**@author cody*@date 2014-08-12*@description *//*#include void *mmap(void *addr,size_t len,int prot,int flag,int filedes,off_t off);int munmap(void *... 阅读全文
posted @ 2014-08-12 14:43 誑逩の蝸犇 阅读(532) 评论(0) 推荐(0) 编辑
摘要: /**@author cody*@date 2014-08-12*@description *//*#include send control and config order to deviceint ioctl(int d,int request,...);params d -- file... 阅读全文
posted @ 2014-08-12 14:42 誑逩の蝸犇 阅读(1118) 评论(0) 推荐(0) 编辑
摘要: /**@author cody*@date 2014-08-12*@description *//*#include #include pid_t fork(void);*/#include #include #include #include void Fork(){ pid_t pid; ... 阅读全文
posted @ 2014-08-12 14:40 誑逩の蝸犇 阅读(563) 评论(0) 推荐(0) 编辑
摘要: /**@author cody*@date 2014-08-12*@description *//*extern char **environ //environment values#include char *getenv(const char *name);int setenv(const ... 阅读全文
posted @ 2014-08-12 14:39 誑逩の蝸犇 阅读(997) 评论(0) 推荐(0) 编辑
摘要: /***@author cody*@date 2014-08-09*@description copy text file* FILE *fopen(filename,openmode)* fclose(FILE *stream)* int fseek(stream,offset,whence)* ... 阅读全文
posted @ 2014-08-09 15:40 誑逩の蝸犇 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 相关的方法:int fputs(const char*s,FILE *stream);int gets(char *s,int size,FILE *stream);具体代码如下/***@author cody*@date 2014-08-09*@description copy text file... 阅读全文
posted @ 2014-08-09 15:36 誑逩の蝸犇 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 1. 新建一个wpf工程,在工程下面新建 一个文件夹themes,在themes下新建两个资源字典文件generic.xaml和PrettySeekBar.xamlgeneric.xamlPrettySeekBar.xaml2. 新建一个类PrettySeekBarnamespacePrettyCo... 阅读全文
posted @ 2014-06-06 09:11 誑逩の蝸犇 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 在android开发中有抽屉效果,就是在页面的边上有一个按钮,可以通过点击或者拖拽这个按钮,让页面显示。Wpf也可以实现相同的效果。主要是通过一个DoubleAnimation和RectAnimation动画实现 private bool _Expand = true; public bool Expand ... 阅读全文
posted @ 2014-03-11 19:11 誑逩の蝸犇 阅读(3127) 评论(0) 推荐(0) 编辑
摘要: Wpf的ScrollBar可以分为六个区域:A.背景、B.向上按钮、C.向下的按钮、D.Track里面向上的按钮、E.Track里面向下的按钮、F.Track的Thumb详情见下图下面通过一个例子来自定义ScrollBar的样式这里用到了两个其它的样式,其中 scroll_background 定义Track.DecreaseRepeatButton 、 Track.IncreaseRepeatButton的背景 scroll_thumb_style定义Thumb的外观这里的Thumb的Height是自动的大小,如果想自己设定Thu... 阅读全文
posted @ 2014-02-27 16:22 誑逩の蝸犇 阅读(10652) 评论(3) 推荐(4) 编辑