문제

I'm very very new to this whole android development thing, I'm trying to create a button with rounded corners and found this article about it.

They mention I should put a button.xml in my drawable folder. The problem is that I have 5 of them(hdpi, ldpi, mdpi, xhdpi, xxhdpi). Is there a way to use one button.xml for all those drawable folders?

도움이 되었습니까?

해결책

Simply create a new subfolder of res and name it drawable. Put the xml there. You can use this folder for drawables that are the same for any configuration.

다른 팁

I do not recommend to use only one size of button. These folders are there for different screen sizes. You can read more about it here and here.

As explained in Iconography you should use the 2:3:4:6:8 scaling ratio.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top