Android添加书签(二)(10)
*/
/* package */void setUrl(String url) {
mUrlText.setText(url);
}
}
BookmarkAdapter.java:
Java代码
package com.iaiai;
import java.io.ByteArrayOutputStream;
import java.util.Date;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.database.ContentObserver;
import android.database.Cursor;
import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.provider.Browser;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebIconDatabase;
import android.webkit.WebIconDatabase.IconListener;
import android.widget.BaseAdapter;
/**
*
* <p>
* Title: BookmarkAdapter.java
* </p>
* <p>
* E-Mail: 176291935@qq.com
* </p>
* <p>
* QQ: 176291935
* </p>
* <p>
* Http: iaiai.iteye.com
* </p>
* <p>
* Create time: 2011-8-29
* </p>
*
* @author 丸子
* @version 0.0.1
*/
class BookmarkAdapter extends BaseAdapter {
private Cursor mCursor;
private int mCount;
private ContentResolver mContentResolver;
private ChangeObserver mChangeObserver;
private DataSetObserver mDataSetObserver;
private boolean mDataValid;
private Bookmarker mBookmarker;
// Implementation of WebIconDatabase.IconListener
private class IconReceiver implements IconListener {
public void onReceivedIcon(String url, Bitmap icon) {
updateBookmarkFavicon(mContentResolver, url, icon);
}
}
// Instance of IconReceiver
private final IconReceiver mIconReceiver = new IconReceiver();
/**
相关新闻>>
- 发表评论
-
- 最新评论 更多>>