2

I am new in Android Application development, I want to create one application where I can add borders or frames to the images in the gallery or to a new picture taken from camera, I have searched through some blogs but I didn't get the answer.

Could anyone tell me the idea or any concept about how to do that application?

2 Answers2

1

After you get the bitmap from the camera or from the gallery (plenty of docs on this) you should add an overlay using a transparent bitmap.

These links should help you (stackoverflow):

Also, some useful information when dealing with bitmaps:

http://android.nakatome.net/2010/04/bitmap-basics.html

Community
  • 1
  • 1
FrancescoR
  • 520
  • 1
  • 4
  • 12
0

you can achieve this by using below code.. i think it helps you

<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>

Ajay
  • 1,189
  • 1
  • 12
  • 28