code: public static float pixelToSip(Context context, float pixels) {
          DisplayMetrics metrics = new DisplayMetrics();
          float scaledDensity = metrics.scaledDensity;
          if (pixels == 0 || scaledDensity == 0) {
              return 1;
          }
          return pixels/scaledDensity;
      }
docs: Convert the pixels to sips, based on density scale.
  @param context the context.
  @param pixels to be converted value.
  @return converted value(sip)