android - 在 Android 中为图像添加框架或边框

标签 android border image-editing

我是 Android 应用程序开发的新手,我想创建一个应用程序,我可以在其中为图库中的图像添加边框或框架。我搜索了一些博客,但没有得到答案。

我想这样创作 https://play.google.com/store/apps/details?id=com.tndev.loveframes&hl=en

谁能告诉我关于如何进行该应用程序的想法或概念?

最佳答案

以编程方式:

ImageView i = new ImageView(mContext);
Drawable d = null;
i.setImageDrawable(d);
        i.setAdjustViewBounds(true);
        i.setScaleType(ScaleType.CENTER_INSIDE);
        i.setBackgroundColor(Color.WHITE); //providing color to the background. 
        i.setPadding(3,3,3,3);//providing padding to the image.
        i.setLayoutParams(new Gallery.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

要将一张图片叠加在另一张图片上,请使用 Canvas 类并检查这些链接: Android: How to overlay-a-bitmap/draw-over a bitmap?

关于android - 在 Android 中为图像添加框架或边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14930634/

相关文章:

css 在表格单元格内移动边框

java Swing JTable 更改单元格边框

android - 如何在 Flutter 中创建过滤图像

android - 如何处理具有调整大小和旋转功能的贴纸?

Android-放大: Uploading/downloading file to/from AWS S3 using Amplify

java - 触发谷歌眼镜上的相机

android - SQLCipher findLibrary 返回空

android - Glide 模块加载自定义尺寸的 url 图片,带有路径和任何 uri 处理

html - 使用 colspan 时双点边框

python - 有没有办法用python自动化/脚本视频编辑?