谁能告诉我,ScaleInto功能可以在具有5.0的较旧OS的实际设备上工作。 Bleow是代码。

 public static Bitmap resizeImage(Bitmap originalImage, int newWidth, int newHeight) {
   Bitmap newImage = new Bitmap(newWidth, newHeight);
   originalImage.scaleInto(newImage, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FILL);
  return newImage;
 }
有帮助吗?

解决方案

不,你可以在 API 该方法仅在OS 5.0中添加。您将无法在旧设备上使用它。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top