Android :: How To Make Shape With Left-top Rounded Corner?
Jun 16, 2010I want to make a shape with with left-top rounded corner and left-bottom rounded corner...
View 2 RepliesI want to make a shape with with left-top rounded corner and left-bottom rounded corner...
View 2 RepliesI 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?
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.
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.
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?
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..
i was cleaning my screen when I noticed some dust on the top left corner of the screen. I don't have a case on but man, i've only had this phone for like 2 weeks. Anyone else having this issue and how did you deal with it? I'm thinking about bringing it into the Sprint store and hopefully, they can clean it out.
View 8 Replies View RelatedI've had my evo for 4 days now, and I think I have a pretty significant amount of dust in the upper left corner. Before I call to exchange this, can anyone take and reply if it is more/less than the dust under your phone? There is also one random spec that made its way down to middle of phone (less concerned about this one). And yes, I know there is a thread complaining about "Crappy" build quality, but I think this phone is stellar in all other regards. I just need some verification that I have an unusual amount of dust for a 4 day old phone.
View 46 Replies View RelatedAfter dl an app how do i get rid of check marks on top left corner?
View 4 Replies View RelatedCan you please tell me how can I place an background image to a the left upper corner of TextView in android? I would like the image not to be scaled by android.
I have tried
Resources res = getResources();
setCompoundDrawables(res.getDrawable(R.drawable.icon48x48_1), null, null, null);
Nothing is shown.
And I have tried
setBackground(R.drawable.icon48x48_1);
But it stretches the image.
I too have dust under the screen of my Evo like some other users on the forums. Almost in the same places too. Upper left hand corner of the screen. Has anyone taken their Evo back because of this issue? I hate to be a nit picky costumer and take it back due to this issue but because I notice it all the time now it's starting to bother me. I bought it at Best Buy so I'm sure they won't have any in stock if I try to return it anytime soon.
View 1 Replies View RelatedDid the Evo always have a Sprint logo on the top left hand corner of the display on the screen?
View 13 Replies View RelatedSince I installed froyo i have intermittently been getting a little green icon in the top left hand corner. It looks a little bit like a green apple and has the 99+ on it.It hasn't caused a problem I just wondered what it was?
View 3 Replies View RelatedPurchased an inexpensive Android tablet (GDIPPO M7) recently. Worked pretty well, and am happy. Except today, when I turned it on and the word "DEMO" in bright red appeared in the corner. Have explored every conceivable setting to turn it off, and also did a factory reset, all to no avail.
View 1 Replies View RelatedI've had the phone for 3 months now.. but i've just realised last night i have some dust under my screen near the top left corner.
View 7 Replies View RelatedIt was earlier this evening in fact. I went with my friends to check out the iphone 4 for the first time. So i decided to try and see the reception problem for myself. I took out my nexus one and did a side by side comparison. However to my surprise the iphone 4 was already at 2 bars the moment i picked it up, no idea why as my nexus one (Which was on the SAME carrier btw) had more bars on it at the same time. I carried on with the test anyway. You guys can guess the result.
The bars didn't drop completely as the coverage in Singapore is much better. But that doesn't mean it had better reception than my nexus one.
But the interesting thing was the lady beside me noticed us and asked "what are you trying to prove?". So while her daughter plays with the ipad, I kindly explained to her the whole issue with the iphone 4's revolutionary antenna having a ******ed flaw by which it loses signal when you cover the bottom left corner of the phone, unlike my phone which did not suffer as much as a drop. She then proceeded to saying "But they fixed the problem if you use the bumpers right?". Thats when i explained that you should not rely on a silly bumper case to improve reception when the actual problem lies with the antenna's design itself. But again she said "but the problem is fixed with the case right?". With one of the store sales person watching us the entire time, i still carried on and said "no it doesn't solve the problem, it only prevents it from happening". So we continued playing with the phone and she asked "you all are not fans of apple are you?". Trying not to be so direct, i just said "I actually used to have an iphone, but i didn't like it so i got this instead *shows nexus one*".
Ive never done this kind of thing before, so it was kinda thrilling. Especially when you know the staff is looking at you pseudo-promoting a rival phone. After looking at the iphone 4, i really think it does look beautiful, but it will still be crippled by the limitations of the OS regardless of how you jailbreak it. When i left the store i kinda hoped i shed some light into that lady's decision on whether or not to buy an iphone 4 or any other phone (Android or non-android).
I was wondering if can make it so when I get a email notification in the upper left hand corner and click on it, instead of bringing it the stock email app, could I make it open the gmail app instead since I like that better?
View 8 Replies View RelatedI've had my Eris sense November, loaded and uninstalled way too many apps, performed hard resets, loaded the 2.1 leak the night it was "found", and even done a couple hard resets sinse then. Had a new one pop up tonight, playing aroung I installed LockBot free. playing with it and Home, the phone got laggy. So, first thing I do is reboot. the phone restarts, but now it has a translucient box in the lower left corner and says "Safe Mode" and none of my Non-Android (ie Sense, Handcent, Pandore,...) widgets are showing up on the screen, let alone working, they just have little boxes that say "Problem Loading Gadget". Rebooted again, "Safe Mode" is gone, but widgets stil not working.....
View 8 Replies View RelatedIn 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 View RelatedI'm doing something like the following:Bitmap mBitmap;mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.myimage);In onDraw I'm doing this:canvas.drawBitmap(mBitmap,0,0,null);My Manifest looks like this:<supports-screens android:smallScreens="false" android:normalScreens="true" android:largeScreens="true" android:anyDensity="false" /On Larger screens, my images shrink down to about a quarter the size of the large screen and sit in the upper left hand corner.For the life of me, I cannot figure out how to get my images and screen coordinates to automatically adjust to the larger screens.
View 1 Replies View RelatedI 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 RelatedI 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 .
I am creating custom shapes for certain buttons but I want them to maintain the systems current color scheme. I thought that by not applying a gradient or color it would automagically take care of this for me but I am mistaken. By doing that I end up with a black button and black text. Any pointers?
Obligatory code...
If you squeeze you home page from corner to corner diagonally. ALL of your home pages appear. While holding you finger in the center make a circle and they will stay until you tap the screen.
View 8 Replies View RelatedI want to have a elmenent with a 2 color border outline. I can do a single color outline using the element, but this only allows me to draw a single line. I tried using 2 elements within my but that didnt work either. Is there a way to either draw a shape within a shape or draw 2 lines around my shape (which has rounded corners btw).
View 3 Replies View RelatedDoes anyone know how to make a View reversed, I have a horizontal ProgressBar and I want it to right to left instead of left to right
View 2 Replies View RelatedI'm using a slidingDrawer in my application that has its handler placed at the bottom when in portrait mode. When the user switches to landscape mode (widescreen) I would like to have the handler located on the left. When I change the orientation from vertical to horizontal, the handler is placed on the right.
I have defined my layout XML like this:
<SlidingDrawer
android:id="@+id/l_drawer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:handle="@+id/l_handle"
android:content="@+id/l_content"
android:orientation="horizontal"
android:layout_gravity="left>
Anyone have an idea for how to make it slide from left to right ?
I have implemented "Sliding Drawer" in my application using the below XML layout code...
but what i am wanting is to Slide the drawer from Left-to-right(Horizontal) instead of this right-to-left, how do i make slide drawer to slide from left-to-right direction?
I am trying to use R.layout.simple_list_item_multiple_choice with ListView. CheckedTextView is used in mple_list_item_multiple_choice.xml, but how can I make the checkbox be left aligned instead of right aligned?
View 1 Replies View RelatedI just got snesoid for the desire, and its working really great , just wondering if any one has figured out how to make the buttons appear on the left so that you can use the trackball as the d-pad, this is so that you can use it in landscape mode. there are various settings to move the buttons top or bottom but not left right. but maybe there is....?
View 4 Replies View Related