Get the radio button drawable of the current version on android

671 Views Asked by At

My main intention is resize the radio button drawables considering the area that is covered by radio group. If I get the drawable of the current android version, I can easily resize it.

Of course I have googled to be able find out the solution. Generally, the people who had the same intention, set a new drawable for the radio button not use the drawable of the radio button.

However, there is a drawback of the solution. As you know that, the drawable can be changed by android version like this.

enter image description hereenter image description here

So the drawback is, if I set my drawable as a radio button icon, it doesn't display like current android version ones. Of course, I can set up drawables for all android versions on their resources folders to be able fix the issue. But I don't want to do that for now.

The other solution is use getButtonDrawable(). However, it require the api 23. But min sdk of my project is 21 so it doesn't solve my problem.

As a result, I just want to get radio button drawable of the current android version.

0

There are 0 best solutions below