Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<gradient>Android のについては、centerXおよびcenterY属性の意味と、それらの値が形状にどのように影響するかを理解できません。また、グラデーションタイプの意味は何sweepですか?
<gradient>
centerX
centerY
sweep
前もって感謝します。
android:centerXandroid:centerYデフォルト値は 0.5 です。
android:centerX
android:centerY
0.5 はビューの中心で、値の範囲は 0 から 1 で、centerX=centerY=0 は画面の左上隅、centerX=centerY=1 はビューが画面全体に表示される場合の右下隅です。
スイープは一種の円形グラデーションです。幅の広いペイント ブラシの側面の 1 つがくっついていて、完全に円を描くように動かしていると想像してください。その効果は、上から見た円錐のようなものです。