1、URL装Bitmap
public void url2Bitmap(String url){
Bitmap bitmap = null;
URLConnection connection ;
InputStream is ;
try {
connection = new URL(url).openConnection();i
is = connection.getInputStream();
//为了更清楚的看到加载图片的等待操作,将线程休眠3秒钟.
Thread.sleep(3000);
BufferedInputStream bis = new BufferedInputStream(is);
//通过decodeStream方法解析输入流
bitmap = BitmapFactory.decodeStream(bis);
is.close();
bis.close();
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
return bitmap;
}
2、EditView 默认不弹出软键盘
android:focusable="true"
android:focusableInTouchMode="true"
原文:https://www.cnblogs.com/xuyj/p/9973231.html