I tried the below code to create a popup window with a tooltip-like arrow on top. picture attached.
But I am getting something different as a result.
popup inflater :
LayoutInflater inflater = (LayoutInflater)
…
I'm starting to learn android layer list and working with drawables.
I'm trying to create a simple line with a circle at each end:
I came up with a layerlist as shown below. It works good but the problem is when I run it on various screen sizes the…
I would like to make an XMl drawable file that resembles as closely as possible to the material design elevation found on Lollipop and above. I currently have a shadow that does not even come close as I have no idea what gradient I'm suppose to…
I have a linear layout view whose background I have set to oval shape solid color. So far I have the background as circle. Now I want to achieve same i.e using shape drawable to get a circle with 2 colors. Please see attached.
I made this:
ShapeDrawable.ShaderFactory shaderFactory = new ShapeDrawable.ShaderFactory() {
@Override
public Shader resize(int width, int height) {
LinearGradient linearGradient = new LinearGradient(0, 0, width,…
Hi I want rounded corners as shown in above image. I have managed to make hexagonal ImageView. But I am not able to round the corners. Please help. I am copying the code here if anyone wants to take a look. I have tried giving the arc as used in…
I am trying to draw a shape that has three rectangular shapes:
solid color
gradient
white line
How do I do that?
When I try this, it does not work. The layout has the parent color.
I am customizing a seekbar in Android, trying to get both inner and outer shadow (bottom side) of the filled section only.
i would like a result like this:
At the moment, I created:
the rounded borders
the gradient effect
the custom thumb
the…
I am trying to figure out why my ripple effect is not conforming to the shape I have placed it in. Below is the code I am using:
This is the multi-purpose button that I am setting to the background of the ImageViews