티스토리 뷰
View의 drawableLeft를 코드에서 설정하기
Drawable img = getContext().getResources().getDrawable( R.drawable.icon);
img.setBounds(0, 0, 60, 60);
txtVw.setCompoundDrawables(img, null, null, null);
OR
Drawable img = getContext().getResources().getDrawable( R.drawable.icon);
txtVw.setCompoundDrawablesWithIntrinsicBounds(img, null, null, null);
* 파라메터 순서는 왼쪽, 위, 오른쪽, 아래
'Mobile > Android' 카테고리의 다른 글
| [Android]ListView사용시 조금은 다른 Holder (0) | 2015.04.20 |
|---|---|
| [Android]View의 FadingEdge 조절 (0) | 2015.04.20 |
| [Android]21버전이후 dex opt 해결 (0) | 2015.04.17 |
| [Android]터치이벤트 발생 (0) | 2015.04.17 |
| [Android]ActionBar Height (0) | 2015.04.17 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- ubuntu
- centos8
- Windows
- tomcat
- golang
- rxswift
- Codable
- intellij
- windows10
- SWIFT
- CentOS
- Kotlin
- docker
- MySQL
- go
- cocoapods
- war
- ios
- Spring
- php
- Python
- android
- github
- Gradle
- git
- Java
- Xcode
- nodejs
- Linux
- enum
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함