ListView Display
来源:互联网 发布:js prompt 编辑:程序博客网 时间:2024/06/03 17:16
How can adapter display the content of the listview.
1.AbsListView.java
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { ....... final View child = obtainView(0, mIsScrap); ..... }//one item, called one time.
2.AbsListView.java
View obtainView(int position, boolean[] isScrap) {....child = mAdapter.getView(position, scrapView, this);....}
3.CursorAdapter.java
public View getView(int position, View convertView, ViewGroup parent) { ..... if (convertView == null) { v = newView(mContext, mCursor, parent); } else { v = convertView; } bindView(v, mContext, mCursor); return v; }
4.CursorAdapter.java
public abstract void bindView(View view, Context context, Cursor cursor);
public abstract View newView(Context context, Cursor cursor, ViewGroup parent);
//so override the the bindView and newView. and we just need the return the item view not the listview.
all adapters getView
View getView(int position, View convertView, ViewGroup parent);so for what adapter, we just need to return one item's view.
file to url
public static Uri fromFile(File file) { if (file == null) { throw new NullPointerException("file"); } PathPart path = PathPart.fromDecoded(file.getAbsolutePath()); return new HierarchicalUri( "file", Part.EMPTY, path, Part.NULL, Part.NULL); }
- ListView Display
- Display _RecordsetPtr via ListView control
- display
- display
- Display
- display
- Display
- display
- display
- Display
- display
- DISPLAY
- display
- display
- display
- display
- display
- display
- Oracle创建用户、表空间、导入导出命令
- 存储过程
- 河内之塔(汉诺塔问题--------递归
- C++赋值兼容规则和多态
- [PSP3000完美破~解]5.03彻底告别刷机!让3K和V3可关机
- ListView Display
- 实用算法实践-第 31 篇 博弈游戏
- Game Center Overview
- C#序列化反序列化帮助类
- vim入门--添加cscope功能
- 实用算法实践-第 32 篇 其它
- codeblocks ide for linux
- windows下Python+Editplus windows Python开发环境
- hibernate——java类型、hibernate映射类型、以及SQL类型之间的映射关系