当前位置: 首页>>代码示例>>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;未经允许,请勿转载。