size of node with shape=circle

From the DOT Guide http://www.graphviz.org/pdf/dotguide.pdf on page 4 it says the following: When drawn, a node’s actual size is the greater of the requested size and the area needed for its text label, unless fixedsize=true, in which case the width and height values are enforced. Thus you simply need to add fixedsize=true to your code

Android shape background

Yes you can use any shape file as background for any view. This sample create rounded background with white color and black border around the shape. Sample : rounded_corner.xml <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”rectangle” > <corners android:bottomLeftRadius=”10dp” android:bottomRightRadius=”10dp” android:topLeftRadius=”10dp” android:topRightRadius=”10dp” /> <stroke android:width=”0.5dp” android:color=”@color/color_grey” /> <solid android:color=”@color/color_white” /> </shape> u can use this as, <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” … Read more

How to set a shape’s background in xml?

I think a layer-list might help you: <?xml version=”1.0″ encoding=”utf-8″?> <layer-list xmlns:android=”http://schemas.android.com/apk/res/android” > <item> <shape android:shape=”rectangle” > <solid android:color=”#ffffff” /> </shape> </item> <item> <shape android:innerRadiusRatio=”4″ android:shape=”ring” android:thicknessRatio=”9″ android:useLevel=”false” > <solid android:color=”#FF0000″ /> <size android:height=”48dip” android:width=”48dip” /> </shape> </item> </layer-list>

How to get round shape in Android [duplicate]

You need to create a shape drawable in the drawable folder that looks something like: <?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”oval” > <gradient android:startColor=”#FFFF0000″ android:endColor=”#80FF00FF” android:angle=”270″/> </shape> (For this example I have saved the drawable as circle.xml and it will have a gradient fill) Then in your layout you need to define a view and … Read more

Two Rectangles intersection

if (X1+W1<X2 or X2+W2<X1 or Y1+H1<Y2 or Y2+H2<Y1): Intersection = Empty else: Intersection = Not Empty If you have four coordinates – ((X,Y),(A,B)) and ((X1,Y1),(A1,B1)) – rather than two plus width and height, it would look like this: if (A<X1 or A1<X or B<Y1 or B1<Y): Intersection = Empty else: Intersection = Not Empty

Drawing multiple shapes with ShapeDrawable in xml with Android

Here’s how I did a filled red circle with a one-pixel black border, with a white number 72 in the middle: Create an XML file in res\drawable and name it appropriately, eg red_circle_black_border.xml <?xml version=”1.0″ encoding=”UTF-8″?> <layer-list xmlns:android=”http://schemas.android.com/apk/res/android”> <item> <shape android:shape=”oval”> <solid android:color=”@android:color/black” /> </shape> </item> <item android:top=”1dp” android:left=”1dp” android:right=”1dp” android:bottom=”1dp”> <shape android:shape=”oval”> <solid android:color=”@android:color/red” … Read more

Shape drawable as background, a line at the bottom

This is how I got a line at the bottom for mine. Draw a stroke but then shift the item up and to the sides to get the top and sides to not show the stroke: <?xml version=”1.0″ encoding=”utf-8″?> <layer-list xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:top=”-8dp” android:left=”-8dp” android:right=”-8dp”> <shape> <solid android:color=”#2b7996″/> <stroke android:color=”#33b5e5″ android:width=”6dp”/> </shape> </item> </layer-list>

I need to change the stroke color to a user defined color. Nothing to do with the state

1. If you have drawable file for a “view” like this <?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android” > <corners android:radius=”5dp” /> <solid android:color=”@android:color/white” /> <stroke android:width=”3px” android:color=”@color/blue” /> </shape> Then you can change a. Stroke color : GradientDrawable drawable = (GradientDrawable)view.getBackground(); drawable.mutate(); // only change this instance of the xml, not all components using this xml … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)