How to draw a circle inside a circle using Android xml shapes?

The only way I’ve gotten this to work is to define a transparent stroke for the inner (i.e., top) circle that’s the difference between the size of the larger and smaller circle. For example, this: <?xml version=”1.0″ encoding=”utf-8″?> <layer-list xmlns:android=”http://schemas.android.com/apk/res/android”> <!– Larger blue circle in back –> <item> <shape android:shape=”oval”> <solid android:color=”#00f”/> <size android:width=”15dp” android:height=”15dp”/> … Read more

angle attribute in android gradient

Gradient basically represents the variation in space(in a direction) of any quantity. With color it represents the variation of color intensity in a direction represented by angle. Here are some diagrams to represent this concept: Here the figure shows the color variation in horizontal direction (angle is set 0).XML code: <shape xmlns:android=”http://schemas.android.com/apk/res/android”> <gradient android:startColor=”#000000″ android:angle=”0″/> … Read more

How to make a shape with left-top round rounded corner and left-bottom rounded corner?

It looks like a bug http://code.google.com/p/android/issues/detail?id=939. Finally I have to write something like this: <stroke android:width=”3dp” android:color=”#555555″ /> <padding android:left=”1dp” android:top=”1dp” android:right=”1dp” android:bottom=”1dp” /> <corners android:radius=”1dp” android:bottomRightRadius=”2dp” android:bottomLeftRadius=”0dp” android:topLeftRadius=”2dp” android:topRightRadius=”0dp”/> I have to specify android:bottomRightRadius=”2dp” for left-bottom rounded corner (another bug here).

Open-sided Android stroke?

I achieved a good solution with this one: <?xml version=”1.0″ encoding=”utf-8″?> <layer-list xmlns:android=”http://schemas.android.com/apk/res/android”> <!– This is the line –> <item android:top=”-1dp” android:right=”-1dp” android:left=”-1dp”> <shape> <solid android:color=”@android:color/transparent” /> <stroke android:width=”1dp” android:color=”#ffffff” /> </shape> </item> </layer-list> This works well in case you need a transparent background but still an open stroke color (In my case I only … Read more

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