/* now i want to save my image present in imageview to phone gallery */
private Button button1;
private ImageView imageView1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
button1 = (Button)findViewById(R.id.button1);
button1.setOnClickListener(this);
}
public void onClick(View v) {
// TODO Auto-generated method stub
if(v == button1) {
Intent myIntent = new Intent(PhoneImageGalleryActivity.this,PhoneImageGalleryActivity.class);
startActivity(myIntent);
}发布于 2012-02-03 18:04:40
如果您将图像保存在SD卡中并运行MediaScanner,它将自动出现在画廊中
发布于 2012-02-03 18:19:14
添加到SD卡的图像已经被MediaScanner扫描过了,你不需要做任何特殊的事情。
缩略图总是在添加图像时创建。这是因为缩略图服务实际上在数据更改时非常频繁/高效地执行此操作。
https://stackoverflow.com/questions/9126249
复制相似问题