设置头像:
Drawable drawable = new BitmapDrawable(dBitmap); //Drawable drawable = Drawable.createFromPath(path); avator.setBackgroundDrawable(drawable);
String filepath = "/sdcard/paiyipai.jpg"; Bitmap bm = BitmapFactory.decodeFile(filepath); //BtimapDrawable是Drawable的子类,最终直接使用bd对象即可。 BitmapDrawable bd=new BitmapDrawable(bm); ImageView.setBackgroundDrawable(bd);
参考:
七牛云存储android客户端及java服务端代码编写.http://www.mamicode.com/info-detail-551140.html
Android客户端实现七牛云存储文件上传.http://blog.csdn.net/lixiaodaoaaa/article/details/42713563
android开发之上传图片到七牛云存储服务器.http://www.2cto.com/kf/201503/385879.html
七牛Android上传token的生成和上传.http://download.csdn.net/detail/hehuoren1/8553977
Android图片上传(头像裁切+原图原样).http://www.2cto.com/kf/201501/371520.html
Android上传图片裁剪功能.http://www.open-open.com/lib/view/open1352201409844.html