rounded-corners

Android: ListView, problem with rounded corners

有些话、适合烂在心里 提交于 2019-11-30 23:46:35
I have ListView with rounded corners implemented like bellow. <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/list_bg" android:divider="#dbdbdb" android:dividerHeight="1sp" android:cacheColorHint="#00000000" android:descendantFocusability="afterDescendants" android:scrollbars="vertical"> </ListView> where list_bg.xml is: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">

How to create a partially-rounded-corners-rectangular drawable with center-crop and without creating new bitmap?

南笙酒味 提交于 2019-11-30 20:38:54
Background I've already seen how to create a drawable that's circular out of a bitmap, and also how to add an outline (AKA stroke) around it, here . The problem I can't find out how to do a similar task for rounding only some of the corners of the bitmap, inside the drawable, without creating a new bitmap, and still do it for a center-crop ImageView. What I've found This is what I've found, but it does create a new bitmap, and when using it in an imageView with center-crop (source here ): /** * Create rounded corner bitmap from original bitmap. * * @param input Original bitmap. * @param

How can I get NSScrollView to respect a clipping path

随声附和 提交于 2019-11-30 19:36:07
问题 I am trying to make a NSScrollView with clipped corners, similar to the Twitter app: I have a NSScrollView subclass which I added the following code: - (void)drawRect:(NSRect)dirtyRect { NSBezierPath *pcath = [NSBezierPath bezierPathWithRoundedRect:[self bounds] xRadius:kDefaultCornerRadius yRadius:kDefaultCornerRadius]; [path setClip]; [super drawRect:dirtyRect]; } I expected the content of the NSScrollView to have rounded corners, but it is not respecting the clipped path. How can I do this

Can't create rounded corners Dialog (Android-Eclipse)

邮差的信 提交于 2019-11-30 16:36:29
I'm trying to make a custom dialog shape for my app's dialogs. I've been searching for this topic for hours, but the solutions I find don't work for me, that's why I ask you for my own problem. I want a Dialog with rounded corners and showing a title and then a ScrollView with some text. The only thing that is not working to me is the rounded corners. Here I post you my code: my AndroidManifest.xml with the activity I want with my rounded-corners Dialog: <activity android:name=".AboutNacimiento" android:label="@string/about_nac_title" android:theme="@style/Theme.CustomDialogTheme" android

Android custom alert dialog with rounded corners and transparent background

时光怂恿深爱的人放手 提交于 2019-11-30 16:09:24
I have created a custom AlertDialog with rounded corners using onDraw of LinearLayout as below, public class RoundedLinearLayout extends LinearLayout { private Paint drawPaint; private Paint roundPaint; private int mCornerRadius = 100; private RectF bounds; @TargetApi(Build.VERSION_CODES.HONEYCOMB) public RoundedLinearLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); onInit(); } public RoundedLinearLayout(Context context, AttributeSet attrs) { super(context, attrs); onInit(); } public RoundedLinearLayout(Context context) { super(context); onInit(); }

Possible to do rounded corners in custom Progressbar progressDrawable?

和自甴很熟 提交于 2019-11-30 15:46:08
问题 I have a progress bar that is supposed to look like the attached image: And I've made it a long way. I'm very close the only part that isn't working is the rounded corners for the progressDrawable. Here is what mine looks like. (Notice, circled in red, that the fill inside the white outline does not have rounded corners): So, I've found a couple of ways to make this work when the progress bar is colored in with a shape, gradient, or color. BUT, I can't get it with an image as the

d3.js custom curve step round

邮差的信 提交于 2019-11-30 13:55:37
I'm working on d3.js .v4 graph with x and y axis and I need your help. Description: xAxis is linear scaled with path on it like this image. I'm stuck here and can't find solution to make path like on this image path with rounded corner This is my code for line function // the path generator for the line chart line = d3.line() .x(function(d, i) { return xScale(i); }) .y(function(d, i) { return yScale(d); }) .curve(d3.curveStep); I tried with cardinal, monotone and catmull buth can't archive desired path. Is it possible to round corners on d3.curveStep? I finally found sometime to comeback to

Rounded Corners in Parent DIV not effecting Child DIVs

不问归期 提交于 2019-11-30 13:17:22
So, I'm experimenting with using rounded-corners in CSS3 (not in IE, don't care if it works there), and I have the DIV where all of my content lives looking quite nice. The problem I'm having is that there are child DIVs that are not getting "masked" by the parent's rounded corners. I'm not looking for the child to inherit the rounded-corners. I just want to have any content inside the parent to not be visible where it is rounded, as if it were masked. I tried using "overflow: hidden;", but that doesn't seem to do the trick. Does anyone have any ideas how the children of the rounded-cornered

Using a rounded corners drawable

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 10:25:15
问题 There is a nice post made by the popular Google developer Romain Guy that shows how to use a rounded corners drawable (called "StreamDrawable" in his code ) on a view efficiently. The sample itself works very well on my Galaxy S3 when in portrait mode, but I have a few issues with it: if the screen is small (for example on qvga screens), the shown images get cropped. if I have an input bitmap that is too small than how I wish to show it, the output image has its edges smeared. Even on the

What is the best way to create standards-based, cross-browser compatible rounded corners in Drupal?

不羁岁月 提交于 2019-11-30 10:10:51
I am currently working on a Drupal 6 theme, for which designer is explicitly requesting to use A LOT of rounded corners. I could of course create the rounded corners - traditionally - with images. But I know there must be also better and easier ways of creating rounded corners. Optimally, I would like to write my CSS as standards-compliant CSS3, with selectors like: h2 {border-radius: 8px;} Use of browser-specific is CSS is very OK also, like h2 {-moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px;} If required, I can also insert some custom JavaScript by hand. I just want