官方demo见
https://github.com/square/otto注意自己该编译版本为2.3以上,默认的1.6不支持match_parent属性,导致布局文件出错。另外需要手动添加android-support-v4和otto到自己的libs文件夹。主要代码逻辑:1,在主页面点clear按...
分类:
移动开发 时间:
2014-05-16 19:19:36
阅读次数:
334
android:fillViewport=trueScrollView下面的组件如果有android:layout_height="fill_parent"或android:layout_height="wrap_content"那么必须将ScrollView的android:fillViewpor...
分类:
移动开发 时间:
2014-05-16 18:09:45
阅读次数:
368
jsfunction:selectBox:function(){ var
li=$(this); var selectbox=li.parent().parent();
selectbox.attr("data-checked",li.attr("data-value"));...
分类:
其他好文 时间:
2014-05-15 21:07:32
阅读次数:
287
其实关键就是window.opener,这个东西就是如何在子窗口页面中,访问父窗口页面的文档的方法,在frame中,是parent、top这类的东西,知道了这个东西,剩下想做点什么就好说了。
父窗口操作子窗口的话,就利用open的返回值就可以了。 father.htm: 我是父页面。child.ht...
分类:
其他好文 时间:
2014-05-15 07:43:22
阅读次数:
232
当scrollview中包含listView时,滑动的时候会出现问题。。最常见的问题是listview滑动不了。。。问题原因是在加载listview时它的高度应该按照adapter所绑定的数据来确定,而不是fill_parent或者是wrap_content...
项目中用到了就把它抽取出来做个记录
import android.view.View;
import android.view....
分类:
移动开发 时间:
2014-05-14 21:13:11
阅读次数:
433
核心点:
super关键字,表示调用的是父类对象。
this关键字,表示调用的是当前运行类对象。
那么如果在父类中,使用了关键字,this,此时的this指的是什么呢?
看下面的例子,再加深理解核心店的第二句话就ok了。
parent类:
package com.ghsy.thissuper;
public class Parent {
public void init(){
...
分类:
其他好文 时间:
2014-05-14 20:04:29
阅读次数:
217
Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match....
分类:
其他好文 时间:
2014-05-14 19:30:36
阅读次数:
292
三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。1)fill_parent设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Windows控件的dockstyle属性大体一致。设置一个顶部布局或...
分类:
移动开发 时间:
2014-05-14 07:02:27
阅读次数:
424
jquery动态事件绑定,父元素需为静态元素,(不能是动态生成);$("#parent").on("click","#child",function(){//....});
分类:
Web程序 时间:
2014-05-14 00:09:15
阅读次数:
282
1.电话拨号器:
activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
a...
分类:
移动开发 时间:
2014-05-13 15:08:57
阅读次数:
508