I would like to create a custom drawable background for an EditText component in my Android layout. This should include a lower border spanning the entire length of the EditText, and 2 connected vertical lines at either end which take up 25% of the…
I'm new in android programming and I try design this shape:
check this link to see the shape that I want to design it
how can make this shape, and how to put picture in the shape like Alexandria?
can any one help me? plz answer with all details to…
I need to create a speech bubble pointing up, but I'm not familiar with android shapes, so looking for examples come across with one as expected, but pointing down, and as I don't know the meaning of pivotX and pivotY, all my attempts to invert the…
I already have shape code and now I need to draw the same programmatically and set its width according to the length of texts in an array. I am not able to reproduce the same using path data.
This is the code:
I'm trying to achieve something like the following:
the image inside is not too much of a problem, but the ring appears to be one. I was able to do this:
using:
I'm trying to draw a circle on previewView by setOnTouchListener as below
val shape = GradientDrawable()
shape.shape = GradientDrawable.OVAL
shape.setColor(Color.TRANSPARENT)
shape.setStroke(5,…
I'm trying to build a layout with a ConstraintLayout with rounded corners inside a ScrollView.
At the top of the layout I want to place an image that should have the top corners rounded (to match the layout corners) and the bottom corners…
I have a simple game where a user can highlight words:
Each letter is a TextView. To highlight, the background is set to a shape like:
top_curve.xml
The code looks like this:
// Method returns a Drawable like:
// return…
I had nested LinearLayouts and after reading some doc I tried to switch to ConstraintLayout. But I did not find how to insert a view to just display a background.
So far I just set the background on the layout containing the items.
This is what the…