Android :: ViewGroup With Rounded Angles - Also Cover Content
Sep 3, 2010I like to have a ViewGroup (like LinearLayout) that has rounded angles. The angle can cover content of the ViewGroup.
View 6 RepliesI like to have a ViewGroup (like LinearLayout) that has rounded angles. The angle can cover content of the ViewGroup.
View 6 RepliesI try to make the Content view of SlidingDrawer is a ViewGroup, for example , in the Launcher example it can have two GridView in the same SlidingDrawer my sample is to make android:content = "@id/layout" ,which is a LinearLayout but i found only the first child in the layout will be shown so i would like to ask is there any constrain to make SlidingDrawer can not have multiple views in its content?
View 3 Replies View RelatedI have a png-picture in ImageView rotatedimage = new ImageView ()
Is there a better way to rotate it in changing directions than the following way? There I have to create a new picture for every new rotating angle and add it to the layout...
I'm trying to figure out exactly how to interpret the rotation angles produced by a Sensor Event for Sensor.TYPE_ORIENTATION. Unfortunately, the documentation (http://developer.android.com/reference/android/ hardware/Sensor Event.html#values) doesn't give a complete definition of it. It defines what the axes are, but doesn't specify what order the three rotations are applied in, nor whether the later rotations are around transformed or untransformed axes. Without knowing that, it's impossible to know what the actual rotation is that's being described.
View 3 Replies View RelatedI'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).
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 RelatedDoes 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?
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 RelatedIs there any way to create EditText that has rounded corners?
View 2 Replies View RelatedThe 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?
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 RelatedI want to make a shape with with left-top rounded corner and left-bottom rounded corner...
View 2 Replies View RelatedI 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'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 RelatedI'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.
I was wondering if there was a way to create a ListView with rounded corners in Android...
View 2 Replies View RelatedI would like to change an image I loaded to have round corners.
Any hints, tutorials, best practices you know of?
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.
This may seem like a stupid question but I need to be sure. I was wondering if it was possible to pro-grammatically change the Content Provider used when making a query given a Content URI. The reason being I need to know if it's possible to force the Calendar/Contacts applications to read from a different database via a different Content Provider temporarily while my application is running, so that I can reuse those applications to display my own data. Since the Content URI s are hard coded in each of these applications the only way it might be possible is if we could somehow temporarily change the Content Provider used for a given URI. I know this probably isn't possible, I just need to show it isn't. Could someone confirm this can't be done?
View 2 Replies View RelatedHow to use viewGroup in android
View 3 Replies View RelatedCan you please tell me how can I setHeight for a ViewGroup? I see there is a layout(l,t,r,b);
But that is different form setHeight(), since I don't know where should be the top/bottom of the viewGroup. I need to set the height of the ViewGroup and return that to ListAdapter.
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 RelatedI 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 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 able to get a GLSurfaceView to have a transparent background with:
CODE:............
when I set the Activity's window background to transparent and the GLSurfaceView is the contentView of the Activity.
But, let's say my GLSurfaceview is parented by a ViewGroup and I want GLSurfaceView bg to be transparent to see the Viewgroup's background - I am not able to do so with the code above. Is this a limitation or am I missing something?
How can one use a GLSurfaceView similar to a ViewGroup, in the sense of adding Views(CustomViews) over it? Is there any means to make the GLSurfaceView be the canvas on which the view draws its contents?
View 5 Replies View RelatedI have a ListActivity whose layout looks like. code...
However, my empty list view consist only of the ImageView listed first inside the nested LinearLayout.
This seems like a reasonable thing to do but I don't completely understand Android's layout rules yet.
I am new to Android, and I am trying to understand how to create a custom ViewGroup. I created MyViewGroup as follows: Code...
View 2 Replies View Related