티스토리 뷰
안드로이드 XML로 도형그리기
1. 사각형
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke
android:width="3dp"
android:color="#FFCD00" />
<corners
android:bottomRightRadius="2dp"
android:bottomLeftRadius="2dp"
android:topLeftRadius="2dp"
android:topRightRadius="2dp"/>
<padding
android:left="2dp"
android:top="2dp"
android:right="2dp"
android:bottom="2dp" />
</shape>
2. 선
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line">
<stroke
android:width="7dp"
android:color="#0000FF"
android:dashWidth="2dp"
android:dashGap="1dp" />
</shape>
3. 원
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid
android:color="#FF0000"/>
<stroke
android:width="6dp"
android:color="#7700FF00"
android:dashWidth="47p"
android:dashGap="1dp" />
<gradient
android:startColor="#FF8800"
android:endColor="#70FF66FF"
android:angle="290"/>
<padding
android:left="9dp"
android:top="9dp"
android:right="9dp"
android:bottom="9dp" />
<corners android:radius="7dp" />
</shape>
'Mobile > Android' 카테고리의 다른 글
[Android]Activity 생성시 Intent Flag (2) | 2015.09.14 |
---|---|
[Android]UpNavigation 구현 (0) | 2015.09.08 |
[Android]안드로이드 4.4 이상 버전에서 문제되는 사항들. (0) | 2015.09.08 |
[Android]Fragment 호출 방식 및 LifeCycle (0) | 2015.09.08 |
[Android]Canvas에 선을 한번에 그리기 (0) | 2015.09.08 |
- Total
- Today
- Yesterday
- rxswift
- Python
- Xcode
- tomcat
- php
- CentOS
- github
- Java
- war
- SWIFT
- golang
- ios
- Windows
- Spring
- MySQL
- git
- Linux
- enum
- android
- nodejs
- windows10
- intellij
- Kotlin
- centos8
- ubuntu
- cocoapods
- Codable
- docker
- go
- Gradle
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |