Android ApiDemos示例解析(15):App->Activity->SetWall易做图
SetWall易做图介绍如何在Android获取当前Wall易做图,对Wall易做图做些修改,然后用修改后的图像重新设置Wall易做图。
Wall易做图Manager用来管理Android的Wall易做图。下面代码通过Wall易做图Manager来取得当前Wall易做图然后显示在屏幕Layout的imageView上。
[java]
final Wall易做图Manager wall易做图Manager
= Wall易做图Manager.getInstance(this);
final Drawable wall易做图Drawable
= wall易做图Manager.getDrawable();
final ImageView imageView
= (ImageView) findViewById(R.id.imageview);
imageView.setDrawingCacheEnabled(true);
imageView.setImageDrawable(wall易做图Drawable);
final Wall易做图Manager wall易做图Manager
= Wall易做图Manager.getInstance(this);
final Drawable wall易做图Drawable
= wall易做图Manager.getDrawable();
final ImageView imageView
= (ImageView) findViewById(R.id.imageview);
imageView.setDrawingCacheEnabled(true);
imageView.setImageDrawable(wall易做图Drawable);
重新设置Wall易做图,也是通过Wall易做图Manager。
[java]
wall易做图Manager.setBitmap(imageView.getDrawingCache());
wall易做图Manager.setBitmap(imageView.getDrawingCache());
作者:mapdigit
补充:移动开发 , Android ,