android.support.v7.app.AppCompatActivity.getContentResolver()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中android.support.v7.app.AppCompatActivity.getContentResolver()方法的一些代码示例,展示了AppCompatActivity.getContentResolver()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppCompatActivity.getContentResolver()方法的具体详情如下:
包路径:android.support.v7.app.AppCompatActivity
类名称:AppCompatActivity
方法名:getContentResolver

AppCompatActivity.getContentResolver介绍

暂无

代码示例

代码示例来源:origin: Rukey7/MvpApp

int e = Settings.System.getInt(mAttachActivity.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS);
float progress = 1.0F * (float) e / 255.0F;
WindowManager.LayoutParams layout = mAttachActivity.getWindow().getAttributes();

代码示例来源:origin: tumblr/PermissMe

/**
 * Getting All Images Path.
 *
 * @param activity
 *            the activity
 * @return ArrayList with images Path
 */
private ArrayList<String> getAllShownImagesPath(AppCompatActivity activity) {
  final Uri uri = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
  final String[] projection = { MediaStore.MediaColumns.DATA };
  final Cursor cursor = activity.getContentResolver().query(uri, projection, null, null, null);
  int column_index_data = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);
  final ArrayList<String> listOfAllImages = new ArrayList<>();
  while (cursor.moveToNext()) {
    listOfAllImages.add(cursor.getString(column_index_data));
  }
  return listOfAllImages;
}

代码示例来源:origin: konradrenner/kolabnotes-android

Bitmap immagex = BitmapFactory.decodeStream(activity.getContentResolver().openInputStream(uri));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
String lowerPath = path.toLowerCase();

代码示例来源:origin: matburt/mobileorg-android

public OutlineAdapter(AppCompatActivity activity) {
  super();
  this.activity = activity;
  this.resolver = activity.getContentResolver();
  this.theme = DefaultTheme.getTheme(activity);
  selectedItems = new SparseBooleanArray();
  refresh();
}

代码示例来源:origin: konradrenner/kolabnotes-android

String path = uri.getPath();
ContentResolver contentResolver = activity.getContentResolver();
Cursor cursor = contentResolver.query(uri, null, null, null, null, null);

代码示例来源:origin: materialos/android-icon-pack

public static boolean check(@NonNull AppCompatActivity context, @NonNull LicensingCallback cb) {
  final String key = Config.get().licensingPublicKey();
  if (key == null || key.trim().isEmpty()) {
    LOG("License checking is disabled.");
    return true;
  } else if (PreferenceManager.getDefaultSharedPreferences(context).getBoolean(KEY_VALID, false)) {
    LOG("License checking has already been done, and the license check was successful.");
    return true;
  }
  if (BuildConfig.DEBUG) {
    Toast.makeText(context, "License checking is disabled for this debug build.", Toast.LENGTH_SHORT).show();
    return true;
  }
  if (context.getContentResolver() == null) {
    if (!context.isFinishing())
      context.finish();
    return false;
  }
  mProgress = ProgressDialogFragment.show(context, R.string.checking_license);
  final String deviceId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
  // Library calls this when it's done.
  mLicenseCheckerCallback = new MyLicenseCheckerCallback(context, cb);
  // Construct the LicenseChecker with a policy.
  mChecker = new LicenseChecker(
      context, new ServerManagedPolicy(context,
      new AESObfuscator(getSalt(context), BuildConfig.APPLICATION_ID, deviceId)),
      key);
  mChecker.checkAccess(mLicenseCheckerCallback);
  return false;
}

代码示例来源:origin: Rukey7/IjkPlayerView

int e = Settings.System.getInt(mAttachActivity.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS);
float progress = 1.0F * (float) e / 255.0F;
WindowManager.LayoutParams layout = mAttachActivity.getWindow().getAttributes();

相关文章

微信公众号

最新文章

更多

AppCompatActivity类方法