isudansh
isudansh

Reputation: 369

How to create button of desired shape in Android

I am trying to create 4 buttons as shown on the image below. Each button is clickable. How can I go about this.

enter image description here

Upvotes: 2

Views: 151

Answers (3)

greenfrvr
greenfrvr

Reputation: 643

You can extend Button class and write your own customized button. This may help http://developer.android.com/training/custom-views/index.html

Upvotes: 0

Jay Vyas
Jay Vyas

Reputation: 2712

Here you can take ImageButton widget of Android.

And u can set any Image in background using background:src.

That is done what you want.

Upvotes: 1

Vikram Singh
Vikram Singh

Reputation: 1420

There is no straight way to achieve this. However you can achieve this by doing some workaround and help of layouts. You can check one of my answer with similar problem.

Upvotes: 1

Related Questions