3

I am unable to figure out how to design layout in android like the images shown below.
Please suggest some solutions in order to achieve the same.

Rounded and spongy or flabby on animating it

Slanting edge

Ajay2707
  • 5,690
  • 6
  • 40
  • 58
Udit Kapahi
  • 2,277
  • 1
  • 27
  • 25
  • 1
    Use http://developer.android.com/reference/android/graphics/Canvas.html#drawPath(android.graphics.Path, android.graphics.Paint) or just simply use image – Leo Aug 31 '15 at 04:44
  • This is simple geometry looking at paint and refreshing your geometry would be a good start' or use images as recommended by @LeoLink – JoxTraex Aug 31 '15 at 04:46
  • Does this answer your question? [create custom curved in a layout, like this image](https://stackoverflow.com/questions/47303873/create-custom-curved-in-a-layout-like-this-image) – Mahozad Oct 14 '20 at 09:20

3 Answers3

0

This can be achieved in two ways:

1- Use images in the background and position them accordingly.

2- Write your own View class and override the onDraw(Canvas canvas) method. You can get help from Android documentation.

Creating Custom Views

Creating a View Class

OR

Check this solution for help:

Android custom shape

Community
  • 1
  • 1
Shahzeb
  • 3,696
  • 4
  • 28
  • 47
0

As the other answers said, you can create custom views in android.
The curves are called Bézier curves. Similar questions have been asked before.

This question and this tutorial might help you on how to implement the curved view.

Mahozad
  • 18,032
  • 13
  • 118
  • 133
0

You can use SVG wave for background, and you can use this link to make online.

AAV
  • 798
  • 1
  • 6
  • 23