當前位置: 首頁>>代碼示例>>Java>>正文


Java Cursor.getExtras方法代碼示例

本文整理匯總了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:
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:18,代碼來源:SuggestionsAdapter.java

示例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;
}
 
開發者ID:quanzhuo,項目名稱:prada,代碼行數:22,代碼來源:UploadAgentHelper.java

示例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;
}
 
開發者ID:quanzhuo,項目名稱:prada,代碼行數:25,代碼來源:UploadAgentHelper.java

示例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;
}
 
開發者ID:quanzhuo,項目名稱:prada,代碼行數:22,代碼來源:UploadAgentHelper.java

示例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();
}
 
開發者ID:googlesamples,項目名稱:android-ContentProviderPaging,代碼行數:31,代碼來源:ImageClientFragment.java

示例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;
}
 
開發者ID:wangyupeng1-iri,項目名稱:springreplugin,代碼行數:10,代碼來源:BinderCursor.java

示例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();
}
 
開發者ID:wangyupeng1-iri,項目名稱:springreplugin,代碼行數:7,代碼來源:ServiceChannelCursor.java

示例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();
}
 
開發者ID:devyok,項目名稱:IPCServiceManager,代碼行數:7,代碼來源:BinderQuerier.java

示例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")) {
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:6,代碼來源:SuggestionsAdapter.java


注:本文中的android.database.Cursor.getExtras方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。