Android——学习笔记

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"

 

Android——学习笔记

上一篇:报错org.apache.ibatis.binding.BindingException: Type interface com.atguigu.mybatis.bean.dao.EmployeeMapper is not known to the MapperRegistry.


下一篇:Netbeans开发工具学习之道:使用Netbeans创建java Web项目