2012年12月8日

Android中setLayoutParams的注意点

摘要: textView.setLayoutParams(new TextSwitcher.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));为什么要用TextSwitcher的LayoutParams呢。查一查API,可以看到这么一句话These supply parameters to the parent of this view specifying how it should be arranged。也就是说一定要用父控件的LayoutParams。如果父控件是LinearLayout,当然就必须写成Linea 阅读全文

posted @ 2012-12-08 16:58 JUN_IT 阅读(1082) 评论(0) 推荐(0) 编辑

Android中BaseAdapter的理解【IT168技术】

摘要: 最近做一个项目,项目中用到了ListView,ListView最重要的就是绑定数据,这个数据由Adapter来提供,这里我重写了BaseAdapter这个类来实现自己的menuAdapter代码如下: package org.leepood.lanorder; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import org.leepood.xmlparse.xmlParse; import android.view.LayoutInflater; import an... 阅读全文

posted @ 2012-12-08 11:29 JUN_IT 阅读(108) 评论(0) 推荐(0) 编辑

导航