Notice
                              
                          
                        
                          
                          
                            Recent Posts
                            
                        
                          
                          
                            Recent Comments
                            
                        
                          
                          
                            Link
                            
                        
                    | 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 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 | 29 | 
| 30 | 
                            Tags
                            
                        
                          
                          - REACT
 - 백준
 - 연습문제
 - 안드로이드
 - bootstrapModal
 - 스킬체크
 - 나머지가1
 - bootstrap
 - 부트스트랩
 - Android
 - Fullcalendar
 - Node
 - 코딩테스트
 - SimpleDateFormat
 - 모달
 - level1
 - Programmers
 - MSSQL
 - 코딩테스트연습
 - 월간코드챌린지시즌2
 - php
 - androidstudio
 - modal
 - Summer/WinterCoding
 - 스킬체크테스트
 - 월간코드챌린지시즌3
 - java
 - AJAX
 - 프로그래머스
 - 동적웹페이지
 
                            Archives
                            
                        
                          
                          - Today
 
- Total
 
개발하는 고양이 오이
1. [Android_Java] 이미지 확대, 축소 하는 방법(PhotoView) 본문
안드로이드 스튜디오에서 이미지를 확대 및 축소하는 방법으로 라이브러리를 이용할 수 있습니다.


-------------------------------------------------------------------------------------------------------------------------
https://github.com/Baseflow/PhotoView
① build.gradle(Project: 프로젝트 이름) - maven {url "https://jitpack.io"} 추가

② build.gradle(Module: 프로젝트 이름.app) - implementation 'com.github.chrisbanes:PhotoView:2.1.3’ 추가

③ XML 코드 (iv_photo_zoom_in_out.xml)

<com.github.chrisbanes.photoview.PhotoView
    android:id="@+id/pv_photo"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
④ JAVA 코드

setContentView(R.layout.iv_photo_zoom_in_out);
PhotoView iv_photo = findViewById(R.id.pv_photo);
// 1.
iv_photo.setImageResource(R.drawable.btn_imgsize_dn);       // 'btn_imgsize_dn' 대신 본인 코드의 drawable 파일 사용
// 2. bitmap 사용 시
iv_photo.setImageBitmap(bitmap);
감사합니다. ( ´●ᗜ●`*)