如何使用它的ID而不是名称将imageView保存到图库?

时间:2016-09-26 11:37:45

标签: android android-imageview

Drawable drawable = getResources()。getDrawable(R.drawable.im);

            bitmap = ((BitmapDrawable)drawable).getBitmap();

            ImagePath=MediaStore.Images.Media.insertImage(
                    getContentResolver(),
                    bitmap,
                    "mm",
                    "mm"
            );
            URI = Uri.parse(ImagePath);
            Toast.makeText(MainActivity.this, ImagePath, Toast.LENGTH_LONG).show();

0 个答案:

没有答案