0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RoundedCornerShapeには数値をそのままにする

0
Posted at

Imageの角丸を行う際に.clip関数を使い、
関数内ではRoundedCornerShapeで角丸の指定を行う。
幅や高さなどたいていの場合はdpやspを使って指定すると思うが、
角丸を行うときは.dpや.spをつけずにRoundedCornerShape(数値)と記載する必要がある。
dpなどをつけてしまうと

java.lang.IllegalArgumentException: The percent should be in the range of [0, 100]

というエラーが出てしまうので注意。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?