Tabnine Logo
OSUtils.isMiui
Code IndexAdd Tabnine to your IDE (free)

How to use
isMiui
method
in
com.lody.virtual.helper.utils.OSUtils

Best Java code snippets using com.lody.virtual.helper.utils.OSUtils.isMiui (Showing top 3 results out of 315)

origin: android-hacker/VirtualXposed

public int getNotificationWidth(Context context, int width, int height, int padding) {
  if (mWidth > 0) {
    return mWidth;
  }
  int w = getDefaultWidth(width, padding);
  if (OSUtils.getInstance().isEmui()) {
    // huawei's emui
    w = getEMUINotificationWidth(context, width, height);
  } else if (OSUtils.getInstance().isMiui()) {
    if (Build.VERSION.SDK_INT >= 21) {
      padding = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10f,
          context.getResources().getDisplayMetrics()));
      w = getMIUINotificationWidth(context, width - padding * 2, height);
    } else {
      padding = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 25f,
          context.getResources().getDisplayMetrics()));
      w = getMIUINotificationWidth(context, width - padding * 2, height);
    }
  }
  mWidth = w;
  return w;
}
origin: bzsome/VirtualApp-x326

public int getNotificationWidth(Context context, int width, int height, int padding) {
  if (mWidth > 0) {
    return mWidth;
  }
  int w = getDefaultWidth(width, padding);
  if (OSUtils.getInstance().isEmui()) {
    // huawei's emui
    w = getEMUINotificationWidth(context, width, height);
  } else if (OSUtils.getInstance().isMiui()) {
    if (Build.VERSION.SDK_INT >= 21) {
      padding = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10f,
          context.getResources().getDisplayMetrics()));
      w = getMIUINotificationWidth(context, width - padding * 2, height);
    } else {
      padding = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 25f,
          context.getResources().getDisplayMetrics()));
      w = getMIUINotificationWidth(context, width - padding * 2, height);
    }
  }
  mWidth = w;
  return w;
}
origin: darkskygit/VirtualApp

public int getNotificationWidth(Context context, int width, int height, int padding) {
  if (mWidth > 0) {
    return mWidth;
  }
  int w = getDefaultWidth(width, padding);
  if (OSUtils.getInstance().isEmui()) {
    // huawei's emui
    w = getEMUINotificationWidth(context, width, height);
  } else if (OSUtils.getInstance().isMiui()) {
    if (Build.VERSION.SDK_INT >= 21) {
      padding = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10f,
          context.getResources().getDisplayMetrics()));
      w = getMIUINotificationWidth(context, width - padding * 2, height);
    } else {
      padding = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 25f,
          context.getResources().getDisplayMetrics()));
      w = getMIUINotificationWidth(context, width - padding * 2, height);
    }
  }
  mWidth = w;
  return w;
}
com.lody.virtual.helper.utilsOSUtilsisMiui

Popular methods of OSUtils

  • getInstance
  • hasFlyme
  • isEmui

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Collectors (java.util.stream)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now