Android :: Strange Looking Rounded Rectangles?

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

Android :: Strange Looking Rounded Rectangles?


Android : Number Of Rectangles Per Sec In Three Different Sizes

May 27, 2010

I am trying to find the number of rectangles per sec in three different size rectangles. I did find it though. But the only problem is that I see all the rectangles after it ran the program completely. But I would like to have rectangles drawn, when I call canvas.drawRect(rec1,paint); function.

I am also looking to keep the old rectangles on the screen while new ones are drawn. I tried with lots of different options nothing worked. To display the rectangles. Can anybody show me the direction to which way to go?

package com.Benchmark.Rectangle; import java.util.TimerTask; import android.R.anim; import android.app.Activity; import android.app.AlertDialog; import android.graphics.drawable.shapes.*; import android.os.Bundle; import android.content.Context; import android.graphics.*; import android.view.View; import android.view.animation.Animation; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; Code...

View 4 Replies View Related

Android :: Draw MapView - Rectangles That Automatically Re-size When User Zooms In And Out

Aug 26, 2010

My Android application has a MapView. I want to divide that MapView into a grid according to latitude and longitude, and shade the different cells of that grid different colors based upon a certain criteria. What's the simplest way to do this?

I could create semi-transparent, solid-color PNG Drawable rectangular images and put them in an ItemizedOverlay centered on the central points of the cells, but then the rectangles would grow and shrink as the user zoomed in and out on the map. I could extend MapView and override the zoom functions so that the rectangles got re-sized when the user zoomed, but that seems really complicated for something that should be simple! Please tell me a better way to do it?

View 1 Replies View Related

Android :: Have Rounded RelativeLayout As In Iphone?

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

Android :: Obtain Rounded Rectangle For TextView?

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

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

Android :: Way To Create EditText With Rounded Corners

Sep 5, 2010

Is there any way to create EditText that has rounded corners?

View 2 Replies View Related

Android :: DrawRoundRect Not Showing Rounded Corners - Nothing At All / Fix It

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

Android : Gridview Selector - Rounded Corners

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

Android :: How To Make Shape With Left-top Rounded Corner?

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

Android :: ViewGroup With Rounded Angles - Also Cover Content

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

Android :: Add Rounded Corner To A Drawable Using As A Background In Droid?

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

Android :: Reuse Hero Rounded List Item Look?

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

Android :: Possibility To Get Border Around A LinearLayout / Rounded Edges?

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

Android :: Create ListView With Rounded Corners In Pohne?

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

Android :: Give Images Rounded Corners In Droid?

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

Android :: Create Rectangle Shape With Only Two Rounded Edges?

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

Android :: Drawable Images - Cropping Edges To Make Rounded

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

Android :: ListView Rounded Corner Hidden By List Item

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

Android :: Setup Rounded Corner Radius Of A Color Drawable Using Xml?

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

Android :: How To Setup Rounded Corner Of List Item On Droid

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

Android :: Make Droid Edittext Topleft And Topright Only Rounded?

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

Android :: IOException - Strange Error

Jul 29, 2009

I'm trying to write a basic application with http get request. Eclipse validated my code, but when I using IOException in Android console I have this strange messages:

CODE:...............

And my application doesn't load into the emulator.

This is my code:

CODE:..................

View 3 Replies View Related

Android :: Strange Error With AdMob

Jan 21, 2010

I have already posted on their developer group but based on everything I've seen I don't expect a reply. I have a strange problem. When I added and adview to my app it imported a bunch of comments that all start with /** Eclipse is acting like it is not a comment. Although it isn't erroring out it has now marked anything starting with R.id as not existing. Is this something I can remedy in eclipse or is it time to chuck my dreams of being mega rich off of all the admob revenue I will be receiving? Writing code is one of few things that teaches me I don't know everything. Join the Closed Beta of Call Girl Manager http://www.fuligin.com/forums

View 5 Replies View Related

Android :: XML Parsing Strange Error

Jun 28, 2010

I am trying to parse XML with a simple sax parser. Interestingly i am able to see desired output in the emulator. but when i run the program on a device program shows no output. I tried many different way for example putting the XML file in a raw folder but every time no out put on device. Tried this on two different handset and everywhere get the same error.

View 2 Replies View Related

Android :: GestureOverlayView Causes Strange TableRow Blending

Jul 2, 2010

With the XML layout shown below, I have some views wrapped in a GestureOverlayView. As shown below, my first row is blended with the second row, as-if the first row is transposed right on top of the second. Now when I take the GestureOverlayView out of the code and leave everything else as-is, my table looks fine - the rows are separate and not on top of each other..........

View 1 Replies View Related

Android :: Keep Getting A Text Message From Strange Sender

Nov 14, 2010

Bit of an odd one this...Every now and again I get a blank text. The sender is stated as ...

View 1 Replies View Related

Android :: Strange Delays When Doing Wifi Scans

Aug 19, 2010

I have a simple app that just initiates a wifi scan every two seconds and then logs the results. I am observing some strange behaviour, and was wondering if anyone could shed some light. When I start scanning, if the phone (Nexus One running latest Froyo OTA release) is just sitting on my desk (screen on or off, it doesn't matter), I receive the wifi scan results about 800ms after initiating the scan, fairly consistently. At most, it takes a second and a half to receive the results. However, if I get up and start to walk around the building that I'm in, the time between initiating the scan and receiving the result begins to vary greatly. What is interesting is that I start to see a pattern where it will take about 40 seconds to receive results, then I will get three or four results two seconds apart, then it takes 40 seconds to receive the next set of results, then I get three or four results two seconds apart, etc.

I've tried obtaining a wifilock, both the FULL and SCAN ones, and that doesn't help. Same with a partial wakelock. I've also tried setting up a thread that pings the supplicant every second and reports when it is unreachable, and it appears to always be responsive (ie., I never see the report). I thought that maybe the problem was that I am unable to receive the result of scans when I am switching between base stations (which might happen when I move around), but if I manually switch between two different networks, it does not cause a delay in my scans (ie., I can still get the results with only a one second delay while it's associating with the new network). Anyway, for my application, it would be incredibly useful to get wifi results at a fairly consistent rate, and so I was hoping that someone on this list might have some suggestions as to how I can achieve this.

View 2 Replies View Related

Android :: Strange Instance Of App Not Responding Error

Aug 31, 2010

A customer just notified me that she's experiencing the infamous "app not responding / wait, force close" message during a specific operation. By just waiting enough, the app resumes ok. Now, that specific operation is indeed long and in fact it has been programmed in a background thread, with a progress dialog signaling the wait. I can't reproduce the problem on my development phone - I suppose because it's perhaps faster than the phone of the user. But I can't reproduce the problem either with the emulator, which I suppose is slow enough. Generally speaking, I think I could be able to solve this specific problem with the customer giving me the proper feedback. It's the general issue that hassles me. This part of the application is very good covered by tests at different levels, including automated black-box tests with Robotium that drive the UI as the user would do, and even in "stress mode" (repeating the test multiple times). So I supposed to be very safe in that area and I'm disappointed to discover that it was a false sense of safety. What am I possibly missing? Also, is it possible / does make sense to "slow down" a phone during tests? I was thinking of a service running in background just consuming some CPU cycles to make the phone less responsive. Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - "We make Java work. Everywhere." a.net/blog/fabriziogiudici - www.tidalwave.it/people Fabrizio.Giud...@tidalwave.it -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

View 3 Replies View Related

Android :: Strange JAVA Syntax - Specifics?

Apr 1, 2009

I am a C programmer before, and I am looking into android source code right now, some JAVA syntax is confusing, I am not sure whether or not it's android related, see:

CODE:..........

1) What's the meaning of Override? Is it ommitable?

2) What does the "synchronized" mean?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved