AbsListView.LayoutParams lp=new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,64);这句话的意思是 创建一个布局(LayoutParams)的实例 lp。AbsListView.Layout...
分类:
移动开发 时间:
2014-08-23 00:59:29
阅读次数:
290
有时候我们需要制作自定义的单选列表,但是会遇到一些问题,比如多选,假选问题,所以网上找了找资料,整理一个demo出来,贴一下代码:
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_co...
分类:
移动开发 时间:
2014-08-22 17:53:19
阅读次数:
381
转载自:http://blog.csdn.net/pkxiuluo01/article/details/7380860Adapter是ListView界面与数据之间的桥梁,当列表里的每一项显示到页面时,都会调用Adapter的getView方法返回一个View。如果列表中有很多的项时会占用极大的系统...
分类:
其他好文 时间:
2014-08-21 22:29:14
阅读次数:
258
<ListView android:id="@id/android:list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="150dip"
a...
分类:
移动开发 时间:
2014-08-21 17:14:04
阅读次数:
245
父窗口中获取iframe中的元素var ifr = document.getElementById('suggustion').contentWindow.document.body;在iframe中获取父窗口的元素格式:window.parent.document.getElementByIdx_...
分类:
其他好文 时间:
2014-08-21 14:57:54
阅读次数:
142
#coding=gbkfromPyQt4importQtGui,QtCoreimportrandomclassMyWidget(QtGui.QWidget):def__init__(self,parent=None):ifparentisNone:self.app=QtGui.QApplicatio...
分类:
其他好文 时间:
2014-08-21 11:23:43
阅读次数:
220
fromPyQt4importQtGui,QtCoreclassTest(QtGui.QWidget):def__init__(self,items,parent=None):self.app=QtGui.QApplication([])super(Test,self).__init__(paren...
分类:
其他好文 时间:
2014-08-21 11:12:03
阅读次数:
214
5 / \ 2 6 / \ \ 1 4 7 / 3class Node{ Node left; Node right; Node parent; int val;}/**1.如果有右子树,则结果为右子树的最左节点。...
分类:
其他好文 时间:
2014-08-21 01:30:33
阅读次数:
216
1. 如果是有parent指针的树,可以转化成 求两个链表第一个公共节点的问题。对于无parent指针普通二叉树(假定这两个节点一定在树中,否则需要先遍历一边树查找是否存在该节点) 1. (剑指offer的解法),先用一定的空间记录从根节点到两个节点各自的路径,然后找这两个路径最后一个相交的节点。....
分类:
其他好文 时间:
2014-08-21 01:29:33
阅读次数:
217
mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView parent, View v,
int position, long id) {
for (int i = 0; i
View cal...
分类:
其他好文 时间:
2014-08-19 10:57:44
阅读次数:
237