Android :: Make An ImageView To Have Rounded Corners?
Mar 17, 2010
In android, ImageView is a rectangle by default. Is it possible to make it a rounded rectangle (clipped off all 4 corners of my Bitmap to be rounded rectangles) in the ImageView? If yes, can you please tell me now can I do that?
View 4 Replies
Sep 5, 2010
Is there any way to create EditText that has rounded corners?
View 2 Replies
View Related
Sep 28, 2010
The following code snippet draws a red rectangle:
RectF rectangle = new RectF(50, 100, 100, 50);
Paint paint = new Paint();
paint.setColor(Color.RED);
canvas.drawRoundRect(rectangle, 0, 0, paint);
However if i change rx and ry both to a positive value, say 5, than nothing is shown. Any ideas?
View 1 Replies
View Related
Apr 6, 2010
I am having a gridview. when i select it, the selector(orange color) will shows like square. i want to set that as rounded corners. how to do that?
View 1 Replies
View Related
Nov 5, 2009
I was wondering if there was a way to create a ListView with rounded corners in Android...
View 2 Replies
View Related
Nov 10, 2009
I would like to change an image I loaded to have round corners.
Any hints, tutorials, best practices you know of?
View 3 Replies
View Related
Feb 27, 2010
I simply use the tabwidget :
CODE:..........
Why are my tabs so uggly in 2.0 (no more rounded corners as in 1.5/1.6) ?
ugly tabs here
=>
This was better
What should I do now to show "rounded corners" TABS to Nexus One (for exemple) users ;-) ?
Is it because of the following manifest lines :
CODE:................
I have to keep android:anyDensity="true" otherwise I've got a problem with re-sizing of the menus described here
As a separate question, my users can change the Locale within my app itself, I then "redraw" the menus using onPrepareOptionsMenu (Menu menu) to refresh the strings within the menu with the new language choosen by the user. Is there an equivalent for TABS (I have local strings within the Title of the TABS) or do I have to delete all the tabs and re-create them from scratch ?
View 2 Replies
View Related
Jun 16, 2010
I want to make a shape with with left-top rounded corner and left-bottom rounded corner...
View 2 Replies
View Related
Feb 16, 2010
I have a small project in which I download images from Internet in the form of drawable and use them in Imageview for which I have provided functionality similar to an Imagebutton but without the gray edges. The question is that is there any functionality in Android (similar to IPhone) by which we can crop the drawable from edges to make them rounded edged drawable. Even if its a "not-tested-neither-recommended" method, do let me know. I would like to work on this a bit.
View 1 Replies
View Related
Sep 7, 2010
I want to have 3 edittext with top and bottom having topleft and topright curves but bottom-left and bottom-right straight. I tried to use shape
but it makes all the corners curved. If i try to use bottomRightRadius, then i get exception.
So I tried different way of doing it
using -ve margin so that bottom on hides the upper one's curve. But now bottom one is going behind the upper one. There is nothing like goToBottom or goToTop .
View 2 Replies
View Related
Jun 25, 2010
I'm wondering how would I make an image that is located at a specific URL equal to an ImageView's image?
View 1 Replies
View Related
Aug 21, 2010
Is it possible to make an imageview link to a web page such that when user taps on the image, it takes them to a web page?
View 2 Replies
View Related
Jan 18, 2009
I have taken a drawable (picture) and split it into multiple Bitmaps. Now I would like to round the corners on the Bitmap. Is there any way to do this?
View 3 Replies
View Related
Mar 1, 2010
I want to draw a bitmap on the screen by specifying the x,y locations of the four corners. I.e. I have a square bitmap and I would like to draw the:
CODE:.........
I have seen the Canvas method: public void drawBitmap (Bitmap bitmap, Rect src, RectF dst, Paint paint)
However I believe this takes the top, right, bottom and left coordinates to draw the Bitmap and not the corner coordinates. I need to specify the CORNER coordinates to draw the bitmap as I may need to stretch/distort the Bitmap (I am drawing the Bitmap on a 3D spherical model).
View 9 Replies
View Related
Oct 31, 2010
The default EditText widget has rounded corners. How do I change them to sharp / edged corners?
View 1 Replies
View Related
Mar 19, 2010
I working on map view. i want to put overlay item on the map view. that overlay items are all depends on currently showing map view and zoom level. how to get current map view's longitude and latitude of that four corner and how to analyze how many overlay item inside it. also we have to check thee zoom level.Any Idea? how to do it?
View 1 Replies
View Related
Mar 22, 2010
I am trying to find solution where I can apply round corners to an image. 1) I have tried to set android:background and in drawable.
View 3 Replies
View Related
Jun 15, 2010
I have a listlayout with items in it that looks like this:
There is first an ImageView (the light) and then two textViews. All of this inside a TableLayout. (source here: http://code.google.com/p/switchctrl/source/browse/trunk/android/res/layout/device_switch.xml)
I want to have a rotating animation of a loading indicator Ontop of this light when this particular device (light) performs an action or an action is performed on it.
How do I put an animation ontop of this light imageview?
View 1 Replies
View Related
Sep 29, 2011
how to do this:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" androidadding="10dp">
<solid android:color="#FFFFFF"/>[code]....
I want to dynamically change that to use the xml drawable
OR
dynamically round the corners.
View 1 Replies
View Related
Nov 2, 2010
I'm using the following to draw rounded-corner rectangles in my Android application and it seems to be working alright but with one minor problem:
CODE:.......
(Adding labels to the rectF's defined above follows) ...
The strange thing is that the two ends of the rectangle aren't rounded over the same. The left-size quarter circles are noticeably smaller than the ones on the right.
Anybody experienced anything similar? It's weird enough that I might change my mind about the round corners if I can't do anything about it.... And if I knew how to do a screen capture from my Android, I would.
The rectangles in question are 78 pixels wide and 48 tall, if that helps (and since ykatchou may be onto something).
View 1 Replies
View Related
Oct 27, 2010
I want a RelativeLayout to have a rounded corner just like we have it in the Iphone.Please let me know how can we do this in Android.
View 2 Replies
View Related
May 20, 2010
Does anyone know how to obtain the rounded rectangle effect from this picture? http://developer.android.com/intl/de/resources/articles/images/list_f...
Is it somewhere in samples?
View 3 Replies
View Related
Sep 3, 2010
I like to have a ViewGroup (like LinearLayout) that has rounded angles. The angle can cover content of the ViewGroup.
View 6 Replies
View Related
Jun 30, 2010
I have a specific drawable that I use as background in my app. It is not a solid color.
Now I want to add rounded corners to this drawable.
I only found the rounded corner available in a shape with a gradient or a solid color as a background but not another drawable.
Is there another easy way of adding rounded corners to a drawable?
View 3 Replies
View Related
Aug 30, 2009
I've been asked to make an app that has a list with items looking similar to this snapshot from Hero: http://www.flickr.com/photos/jaxxdotorg/3640222441/in/set-72157619952...Is there a way to reuse this in any way or do I have to re-design it from scratch?
View 5 Replies
View Related
Jan 27, 2009
I'm not very experienced in Java. Is there an easy possibility to get a border and round edges around a LinearLayout? (perhaps with XML parameters)
Or do I have to draw my own widgets.
View 3 Replies
View Related
Oct 14, 2010
I can create a shape that is a rectangle with all edges rounded. However, what I'm wanting is a rectangle shape with only 2 of the edges rounded. Is this possible?
I'm essentially hacking together a ListView that looks like a bubble with rounded edges. I'm looking to add a header that has the two top edges rounded and a footer with the two bottom edges rounded.
View 4 Replies
View Related
Nov 8, 2010
I have this Listview element:
<ListView
android:id="@+id/category_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/list_background"
android:layout_marginTop="10sp"
android:layout_marginLeft="10sp"
android:layout_marginRight="10sp"
android:drawSelectorOnTop="false"
android:listSelector="@drawable/list_item_background"
android:cacheColorHint="#FFFFFF"
android:clipToPadding="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"a
ndroid:longClickable="true"
android:footerDividersEnabled="true"
android:headerDividersEnabled="true"
android:dividerHeight="1px" />
where list_background is:
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="10dp" /> <solid android:color="#FFFFFF"/>
</shape>
The list view loads itself with the rounded corners, but then, the items of the list hide the round corners.
View 2 Replies
View Related
Jan 23, 2010
On the android website, there is a section about color drawables. Defining these drawables in xml looks like this:
<resources>
<drawable name="solid_red">#f00</drawable>
<drawable name="solid_blue">#0000ff</drawable>
<drawable name="solid_green">#f0f0</drawable>
</resources>
In the java api, they have thr following method to define rounded corners:
setCornerRadius(float radius)
Is there a way to set the rounded corners in the xml?
View 2 Replies
View Related
Oct 26, 2010
How to setup the attribute to achieve the rounded corner for each item in the ListView?
Please kindly give an example if you can, thanks!
for example:
http://www.flickr.com/photos/jaxxdotorg/3640222441/in/set-72157619952823330/
EDIT:
That's my code here for the answer..
View 1 Replies
View Related