Hi I'm trying to make a drawable which looks like a small vertical line with a circle attached to the bottom of it. I am trying to figure out if creating such a shape in a single xml file is possible (I know I could probably place two shapes on top…
i have an issue here. I have an .xml file in the drawable which is the android:shape="line". below is the code:
when this .xml is applied to my linear layout…
I m tying to get rounded corners with background color in shape xml file. But its not working with corners. Here is the output of the code
And here is the code
What I have Tried:
I'm drawing shapeDrawables in onDraw(Canvas canvas) with specified the bounds.
Added Handle Input Gestures which allow the view to scroll in any direction like 2d scroll view like mentioned in this SO post.
Problem:
when I scroll…
What I have Tried:
I'm trying to display the arrow line with following code
Path mArrowPath=new Paint();;
mArrowPath.rewind();
mArrowPath.moveTo(0, mHeight / 2);
mArrowPath.lineTo(mWidth / 2, 0);
mArrowPath.lineTo(mWidth, mHeight /…
I am trying to display an activity with a translucent background on top of another with a drawable in the center of the screen. The drawable has rounded corners, and I've set a rectangle shape with rounded corners as the background of the layout. …
I am trying to create thin colored stripes in my app. This is similar to stripes of different color that we see in calendar apps.
Is there any easy way to do it.
What I am doing:
I have a shape defined with width and height and I am trying to apply…
PROBLEM
I have inflate some layout to add into the existing layout by using below code.
Everything seem to be ok in API = 19 However, below 19 is not.
I don't know what happen here please help me find problems thx.
EXAMPLE IMAGE
DEFAULT VIEW…
I have implemented Navigation Drawer for my App. This works just fine. I am setting a counter for an item in the menu. Which would show a number.
For which I am trying out the shapes (ring). I would like to show a circle with the number inside it.…
I have create a shape.xml in android project. In this xml file i have a rectangle shape design with border.This is working fine. I need to create a another rectangle shape with left border in the same xml. Is this possible or not. If its possible…
I am using a large number of textviews across my android app. And I have a background.xml file with shape and color property of rounded edges. I set this background to my textview. If I have a few different colors as background, I can create…
I'm trying to crop an image to triangle in my Android App so that I only get the triangle portion of the image. How can this be done? I've successfully done the cropping for Square and Circle shapes but I'm unable to do the same for the triangle.…