本文整理匯總了Java中org.zirco.model.DbAdapter類的典型用法代碼示例。如果您正苦於以下問題:Java DbAdapter類的具體用法?Java DbAdapter怎麽用?Java DbAdapter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DbAdapter類屬於org.zirco.model包,在下文中一共展示了DbAdapter類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import org.zirco.model.DbAdapter; //導入依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.adblocker_whitelist_activity);
setTitle(R.string.AdBlockerWhiteListActivity_Title);
mDbAdapter = new DbAdapter(this);
mDbAdapter.open();
registerForContextMenu(getListView());
fillData();
}
示例2: fillData
import org.zirco.model.DbAdapter; //導入依賴的package包/類
/**
* Fill the list view.
*/
private void fillData() {
mCursor = mDbAdapter.getWhiteListCursor();
startManagingCursor(mCursor);
String[] from = new String[] {DbAdapter.ADBLOCK_URL};
int[] to = new int[] {R.id.AdBlockerWhiteListRow_Title};
mCursorAdapter = new SimpleCursorAdapter(this, R.layout.adblocker_whitelist_row, mCursor, from, to);
setListAdapter(mCursorAdapter);
setAnimation();
}
示例3: onCreate
import org.zirco.model.DbAdapter; //導入依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mobile_view_list_activity);
setTitle(R.string.MobileViewListActivity_Title);
mDbAdapter = new DbAdapter(this);
mDbAdapter.open();
registerForContextMenu(getListView());
fillData();
}
示例4: fillData
import org.zirco.model.DbAdapter; //導入依賴的package包/類
/**
* Fill the list view.
*/
private void fillData() {
mCursor = mDbAdapter.getMobileViewUrlCursor();
startManagingCursor(mCursor);
String[] from = new String[] {DbAdapter.MOBILE_VIEW_URL_URL};
int[] to = new int[] {R.id.MobileViewListRow_Title};
mCursorAdapter = new SimpleCursorAdapter(this, R.layout.mobile_view_list_row, mCursor, from, to);
setListAdapter(mCursorAdapter);
setAnimation();
}
示例5: getAdBlockWhiteList
import org.zirco.model.DbAdapter; //導入依賴的package包/類
/**
* Get the list of white-listed url for the AdBlocker.
* @param context The current context.
* @return A list of String url.
*/
public List<String> getAdBlockWhiteList(Context context) {
if (mAdBlockWhiteList == null) {
DbAdapter db = new DbAdapter(context);
db.open();
mAdBlockWhiteList = db.getWhiteList();
db.close();
}
return mAdBlockWhiteList;
}
示例6: getMobileViewUrlList
import org.zirco.model.DbAdapter; //導入依賴的package包/類
/**
* Get the list of mobile view urls.
* @param context The current context.
* @return A list of String url.
*/
public List<String> getMobileViewUrlList(Context context) {
if (mMobileViewUrlList == null) {
DbAdapter db = new DbAdapter(context);
db.open();
mMobileViewUrlList = db.getMobileViewUrlList();
db.close();
}
return mMobileViewUrlList;
}