Thursday, February 9, 2012

Re: [android-developers] Re: Rounded image view

hi try this code...

/drawable/image_shape.xml

<?xml version="1.0" encoding="UTF-8"?>
<shape      xmlns:android="http://schemas.android.com/apk/res/android"
            android:shape="rectangle">
    
    <solid   android:color="#EAEAEA"/>
    
    <corners    android:bottomLeftRadius="20dip"
                android:topRightRadius="20dip"
                android:topLeftRadius="20dip"
                android:bottomRightRadius="20dip"/>
</shape>

thisis layout1.xml file

<LinearLayout android:id="@+id/linearLayout1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingRight="5dip">
<ImageButton android:id="@+id/imageButton1"
            android:layout_width="120dip"
            android:layout_height="120dip"
            android:scaleType="fitStart"
            android:background="@drawable/image_shape"/>
   </LinearLayout>

and i attached image store in sdcard and run...
this may be helps....

in onCreate() method.....
myButton = (ImageButton) findViewById(R.id.imageButton1);
Bitmap bm = BitmapFactory.decodeFile("/sdcard/indela.png");
myButton.setImageBitmap(bm);
On Thu, Feb 9, 2012 at 2:38 PM, chowdary nani <naveenneelinfo@gmail.com> wrote:


On Thu, Feb 9, 2012 at 2:23 PM, chowdary nani <naveenneelinfo@gmail.com> wrote:
Hi   skink ,
I neen rounded corners for frame please help me

Thanks for concern.
Thanks for time.
Thanks for replay.
Thanks 
Naveen.


On Thu, Feb 9, 2012 at 2:15 PM, skink <pskink@gmail.com> wrote:


chowdary nani wrote:

>
> Please help me.
>
>


but with what? what's your goal?

do you want your image to have rounded corners or the frame needs to
be rounded?


pskink

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment