1
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?

More than 1 year has passed since last update.

shapeタグで半円を作る方法

Posted at

初めに

今回はAndroid XMLのShapeタグで半円を作る方法を紹介していこうと思います

本文

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@color/white" />
    <size
        android:height="120dp"
        android:width="60dp"/>
    <corners android:topLeftRadius="60dp"
        android:bottomLeftRadius="60dp"/>
</shape>

大きさを変更したい場合はheightwidthを広げれば大丈夫です、その際はradiusも併せて変更しなければいけません
また、今回紹介したものは左側のみの半円ですがradiusをつける場所を変えることで上下左右自由に変更することができます

最後に

備忘録としての役割が強いですがどなたかのお役に立てれば幸いです

1
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
1
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?