Android添加书签(二)(2)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
ContentValues inputValue = new ContentValues();
inputValue.put(android.provider.Browser.BookmarkColumns.BOOKMARK, 1);
inputValue.put(android.provider.Browser.BookmarkColumns.TITLE, "丸子");
inputValue.put(android.provider.Browser.BookmarkColumns.URL, "http://iaiai.iteye.com");
ContentResolver cr = getContentResolver();
Uri uri = cr.insert(android.provider.Browser.BOOKMARKS_URI, inputValue);
bookmarkAdapter = new BookmarkAdapter(this, "");// new
// ArrayAdapter<Bookmark>(this,
// android.R.layout.simple_list_item_single_choice,bookmarks);
mListView = ((ListView) findViewById(R.id.mylistview));
mListView.setAdapter(bookmarkAdapter);
mListView.setOnItemClickListener(this);
upButton = (ImageButton) findViewById(R.id.upbutton);
downButton = (ImageButton) findViewById(R.id.downbutton);
deleteButton = (ImageButton) findViewById(R.id.deletebutton);
launchButton = (ImageButton) findViewById(R.id.launchbutton);
topButton = (ImageButton) findViewById(R.id.topbutton);
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>