本文整理匯總了Java中android.database.Cursor.getExtras方法的典型用法代碼示例。如果您正苦於以下問題:Java Cursor.getExtras方法的具體用法?Java Cursor.getExtras怎麽用?Java Cursor.getExtras使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.database.Cursor
的用法示例。
在下文中一共展示了Cursor.getExtras方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateSpinnerState
import android.database.Cursor; //導入方法依賴的package包/類
private void updateSpinnerState(Cursor cursor) {
Bundle extras = cursor != null ? cursor.getExtras() : null;
if (DBG) {
Log.d(LOG_TAG, "updateSpinnerState - extra = "
+ (extras != null
? extras.getBoolean(SearchManager.CURSOR_EXTRA_KEY_IN_PROGRESS)
: null));
}
// Check if the Cursor indicates that the query is not complete and show the spinner
if (extras != null
&& extras.getBoolean(SearchManager.CURSOR_EXTRA_KEY_IN_PROGRESS)) {
// mSearchView.getWindow().getDecorView().post(mStartSpinnerRunnable); // TODO:
return;
}
// If cursor is null or is done, stop the spinner
// mSearchView.getWindow().getDecorView().post(mStopSpinnerRunnable); // TODO:
}
示例2: isUserAgreeUpload
import android.database.Cursor; //導入方法依賴的package包/類
public boolean isUserAgreeUpload(){
Cursor cursor = null;
boolean isAgreeUpload = false;
try {
cursor = getContentResolver().query(CONTENT_URI, null, null, null, null);
cursor.moveToNext();
Bundle bundle = cursor.getExtras();
if (bundle != null) {
isAgreeUpload = bundle.getBoolean("service_on");
}
} catch(Exception ex){
Log.i(TAG, ex.toString());
}finally{
if (cursor != null) {
cursor.close();
}
}
return isAgreeUpload;
}
示例3: getAPRServerURL
import android.database.Cursor; //導入方法依賴的package包/類
public String getAPRServerURL(){
Cursor cursor = null;
String ServerURL = Util.APR_SERVER_URL;
try {
cursor = getContentResolver().query(CONTENT_URI, null, null, null, null);
cursor.moveToNext();
Bundle bundle = cursor.getExtras();
if (bundle != null) {
if (bundle.getString("aprServerUrl") != null &&
!"null".equals(bundle.getString("aprServerUrl"))) {
ServerURL = bundle.getString("aprServerUrl");
}
}
} catch(Exception ex){
Log.i(TAG, ex.toString());
}finally{
if (cursor != null) {
cursor.close();
}
}
return ServerURL;
}
示例4: getDUTInfoString
import android.database.Cursor; //導入方法依賴的package包/類
public String getDUTInfoString(){
Cursor cursor = null;
String dutInfoString = "";
try {
cursor = getContentResolver().query(CONTENT_DUTINFO_URI, null, null, null, null);
cursor.moveToNext();
Bundle bundle = cursor.getExtras();
if (bundle != null) {
dutInfoString = bundle.getString("stringDUT");
}
} catch(Exception ex){
Log.i(TAG, ex.toString());
}finally{
if (cursor != null) {
cursor.close();
}
}
return dutInfoString;
}
示例5: onLoadFinished
import android.database.Cursor; //導入方法依賴的package包/類
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
Bundle extras = cursor.getExtras();
int totalSize = extras.getInt(ContentResolver.EXTRA_TOTAL_SIZE);
mAdapter.setTotalSize(totalSize);
int beforeCount = mAdapter.getFetchedItemCount();
while (cursor.moveToNext()) {
String displayName = cursor.getString(cursor.getColumnIndex(
ImageContract.Columns.DISPLAY_NAME));
String absolutePath = cursor.getString(cursor.getColumnIndex(
ImageContract.Columns.ABSOLUTE_PATH));
ImageAdapter.ImageDocument imageDocument = new ImageAdapter.ImageDocument();
imageDocument.mAbsolutePath = absolutePath;
imageDocument.mDisplayName = displayName;
mAdapter.add(imageDocument);
}
int cursorCount = cursor.getCount();
if (cursorCount == 0) {
return;
}
Activity activity = ImageClientFragment.this.getActivity();
mAdapter.notifyItemRangeChanged(beforeCount, cursorCount);
int offsetSnapShot = mOffset.get();
String message = activity.getResources()
.getString(R.string.fetched_images_out_of, offsetSnapShot + 1,
offsetSnapShot + cursorCount, totalSize);
mOffset.addAndGet(cursorCount);
Toast.makeText(activity, message, Toast.LENGTH_LONG).show();
}
示例6: getBinder
import android.database.Cursor; //導入方法依賴的package包/類
public static final IBinder getBinder(Cursor cursor) {
Bundle extras = cursor.getExtras();
extras.setClassLoader(BinderCursor.class.getClassLoader());
BinderParcelable w = (BinderParcelable) extras.getParcelable(BINDER_KEY);
if (LOG) {
LogDebug.d(PLUGIN_TAG, "get binder = " + w.mBinder);
}
return w.mBinder;
}
示例7: getBinder
import android.database.Cursor; //導入方法依賴的package包/類
static final IBinder getBinder(Cursor cursor) {
Bundle bundle = cursor.getExtras();
bundle.setClassLoader(ParcelBinder.class.getClassLoader());
ParcelBinder parcelBinder = bundle.getParcelable(SERVER_CHANNEL_BUNDLE_KEY);
return parcelBinder.getIbinder();
}
示例8: query
import android.database.Cursor; //導入方法依賴的package包/類
static final IBinder query(Cursor cursor) {
Bundle bundle = cursor.getExtras();
bundle.setClassLoader(BinderParcel.class.getClassLoader());
BinderParcel parcelBinder = bundle.getParcelable(BinderCusrsor.BINDER_CURSOR);
return parcelBinder.getIbinder();
}
示例9: updateSpinnerState
import android.database.Cursor; //導入方法依賴的package包/類
private void updateSpinnerState(Cursor cursor) {
Bundle extras = cursor != null ? cursor.getExtras() : null;
if (extras != null && !extras.getBoolean("in_progress")) {
}
}