jfo planet

Hope is the best gift that tomorrow gives.

  • 首页
  • 分类
  • 归档
  • 标签
  • 搜索
close

如何使inline元素垂直居中(line-height和vertical-align)

发表于 2012-05-10   |   分类于 python/js/php/html/mysql/http
 <!DOCTYPE html><html><head><meta  charset="utf-8" /><title>横向对齐+垂直居中</title><style type="text/css">.box{height:100px;border:1px solid #000;}.box input,.box span{vertical-align:middle;}.pillar{display:inline-block;width:0px;height:100%;vertical-align:middle;}  / width:0的话,在opera下会失效。当然也有另外的方法来解决opera /</style></head><body><div class="box"><span class="pillar" ></span ...
阅读全文 »

CSS3 和 JavaScript 特效

发表于 2012-04-30   |   分类于 python/js/php/html/mysql/http
 http://www.oschina.net/news/28001/9-applicable-and-awesome-css3-and-javascript-effects?from=20120422 Paperfold  3D Flip list menu Animated Menu Icons Animated CSS3 Gallery      
阅读全文 »

如何正确使用平移动画(关于fillBefore和fillAfter的一点说明)

发表于 2012-04-20   |   分类于 Android
如何实现将View向上平移自身高度一半的距离? TranslateAnimation translate = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0.5f);mView.startAnimation(translate);问题:当动画结束后,View会跳回到原始位置。 改进:AnimationSet set = new AnimationSet(true);TranslateAnimation translate = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF ...
阅读全文 »

standard/singleTop/singleTask/singleInstance

发表于 2012-03-21   |   分类于 Android
  A "singleInstance" activity is always at the top of the stack (since it is the only activity in the task), so it is always in position to handle the intent. However, a "singleTask" activity may or may not have other activities above it in the stack. If it does, it is not in position to handle the intent, and the intent is dropped. (Even though the intent is dropped, its arrival would have caused the task to come to the foreground, where it would remain.)
阅读全文 »

使用TextView/EditText应该注意的地方

发表于 2012-03-13   |   分类于 Android
关于各种EditText、软键盘各种问题的集合:http://gundumw100.iteye.com/blog/974557 
阅读全文 »

CGlib——Code Generation Lib(代理模型的一种实现)

发表于 2012-02-28   |   分类于 Java
http://llying.iteye.com/blog/220452 CGlib是什么? CGlib是一个强大的,高性能,高质量的Code生成类库。它可以在运行期扩展Java类与实现Java接口。 当然这些实际的功能是asm所提供的,asm又是什么?Java字节码操控框架,具体是什么大家可以上网查一查,毕竟我们这里所要讨论的是cglib, cglib就是封装了asm,简化了asm的操作,实现了在运行期动态生成新的class。 可能大家还感觉不到它的强大,现在就告诉你。 实际上CGlib为spring aop提供了底层的一种实现;为hibernate使用cglib动态生成VO/PO (接口层对象)。 下面我们将通过一个具体的事例来看一下CGlib体验一下CGlib。  CGlib 2.13  ASM 2.23 以一个实例在简单介绍下cglib的应用。 我们模拟一个虚拟的场景,模拟对表的操作。 1. 开始我们对表提供了CRUD方法。 我们现在创建一个对Tab ...
阅读全文 »

Java 动态代理学习(Proxy,InvocationHandler)

发表于 2012-02-27   |   分类于 Java
  /   相亲接口      @author zhengt   @time Jun 3, 2095 3:13:03 PM  */  public interface XiangQinInterface {      /       相亲方法      /      public void xiangQin();  }  /   张三相亲实现类   &nb ...
阅读全文 »

android:以文件方式读取数据库blob字段(使用MemoryFile)

发表于 2012-02-21   |   分类于 Android
Android的ContentResolver中有一个接口叫openAssetFileDescriptor,在doc中的解释如下:public final  openAssetFileDescriptor ( uri,  mode)Since: API Level 3Open a raw file descriptor to access data under a URI. This interacts with the underlying  method of the provider associated with the given URI, to retrieve any file stored there.Accepts the following URI schemes:content (SCHEME_CONTENT)android.resource (SCHEME_ANDROID_RESOURCE)file (SCHEME_FILE)The android.resource (S ...
阅读全文 »

Android KeyEvent 的 生命周期

发表于 2012-02-17   |   分类于 Android
1、生成       存在这样一个线程,它不断地从driver读取Event,并把它放到RawEvent队列中。这个队列中的RawEvent既有按键,也有触摸、轨迹球等事件。       RawEvent队列中的每个RawEvent最后都会通过一系列转化,最终变为KeyEvent被发送给另外一个线程,即输入线程,也就是一个Activity的主线程。2、传递       KeyEvent传递过程主要可以划分为三步:过滤器、View树、Activity       过滤器部分主要对应着PhoneWindowManager.java中的interceptKeyTq和interceptKeyTi这两个方法。它们的代码可以在frameworks/base/policy/base/phone/com/android/internal/policy /impl/PhoneWindowManager.java中看到。    ...
阅读全文 »

Writing an Android Sync Provider: Part 2

发表于 2012-01-10   |   分类于 Android
Writing an Android Sync Provider: Part 2January 23rd, 2010 Sam Steele One of the great new user-facing features of Android 2.0 is the is the new Facebook app, which brings your Facebook contacts and statuses into your Android contacts database:So, how exactly does my Nexus One know that Chris is excited about the upcoming launch of his new mobile apps? The answer is a Contacts sync provider in the Facebook app. Read on to learn how to create your own!Sync ProvidersSync providers are s ...
阅读全文 »
1…111213…61
jfo

jfo

605 日志
38 分类
4 标签
RSS
GitHub 微博
友情链接
  • 收藏夹
  • 网络剪贴板
  • 爱逛吧
© 2007 - 2018 jfo
由 Hexo 强力驱动
主题 - NexT.Pisces