本文整理汇总了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")) {
}
}