我正在使用毕加索库下载并将图像加载到imageView中.现在我想知道在将它们加载到imageViews之前我如何获得图像的宽度和高度?
我有一个包含两个imageView的适配器的列表视图(其中一个是垂直的,另一个是水平的).取决于图像宽度和高度我想将图像加载到其中一个图像视图中.
当我想在我的项目中导入扫描器类时eclipse向我展示一些错误:
Run Code Online (Sandbox Code Playgroud)Exception in thread "main" java.lang.Error: Unresolved compilation problems: The constructor Scanner(InputStream) is undefined The method nextLine() is undefined for the type Scanner
这是我的代码:
import java.util.Scanner;
public class Scanner {
public static void main(String[] args) {
Scanner myScanner = new Scanner(System.in);
System.out.println(myScanner.nextLine());
}
}
Run Code Online (Sandbox Code Playgroud)