我是 Android 应用程序开发的新手,我想创建一个应用程序,我可以在其中为图库中的图像或从相机拍摄的新照片添加边框或框架,我搜索了一些博客,但没有得到答案.
谁能告诉我有关如何执行该应用程序的想法或任何概念?
我是 Android 应用程序开发的新手,我想创建一个应用程序,我可以在其中为图库中的图像或从相机拍摄的新照片添加边框或框架,我搜索了一些博客,但没有得到答案.
谁能告诉我有关如何执行该应用程序的想法或任何概念?
从相机或图库(大量文档)获取位图后,您应该使用透明位图添加叠加层。
这些链接应该可以帮助您(stackoverflow):
此外,处理位图时的一些有用信息:
你可以通过使用下面的代码来实现这一点..我认为它可以帮助你
<FrameLayout
android:id="@+id/image_layoutf"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:id="@+id/bbb"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00000000"
android:orientation="vertical" >
<ImageView
android:id="@+id/border_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/backgroundimage1" />
</LinearLayout>
<LinearLayout
android:id="@+id/bbb2"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_gravity="bottom"
android:background="@android:color/black"
android:orientation="vertical" >
<ImageView
android:id="@+id/border_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/frame1" />
</LinearLayout>
</FrameLayout>