Android添加书签(二)(3)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
bottomButton = (ImageButton) findViewById(R.id.bottombutton);
upButton.setOnClickListener(this);
downButton.setOnClickListener(this);
deleteButton.setOnClickListener(this);
launchButton.setOnClickListener(this);
topButton.setOnClickListener(this);
bottomButton.setOnClickListener(this);
// if we have some bookmarks select the first and start everything
if (bookmarkAdapter.getCount() > 0) {
bookmarkAdapter.initialiseAllRows();
currentPos = 0;
bookmarkAdapter.setSelected(currentPos);
}
// Make sure the welcome message only appears on first launch
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
if (settings != null) {
boolean launchedPreviously = settings.getBoolean(LAUNCHED_KEY,
false);
if (!launchedPreviously) {
showDialog(DIALOG_WELCOME);
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean(LAUNCHED_KEY, true);
editor.commit();
}
}
}
/**
* Invoked during init to give the Activity a chance to set up its Menu.
*
* @param menu
* the Menu to which entries may be added
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>