본문 바로가기
개발/안드로이드

ScrollView 안에 ImageView를 넣으면 위아래 여백이 생기는 경우

by darksilber 2019. 5. 21.
반응형

출처 - https://m.blog.naver.com/PostView.nhn?blogId=kkensu&logNo=220525389807&proxyReferer=http%3A%2F%2Fwww.google.co.kr%2Furl%3Fsa%3Dt%26rct%3Dj%26q%3D%26esrc%3Ds%26source%3Dweb%26cd%3D7%26ved%3D2ahUKEwjvssmrpaziAhWGHqYKHUmuAvsQFjAGegQIBhAB%26url%3Dhttp%253A%252F%252Fm.blog.naver.com%252Fkkensu%252F220525389807%26usg%3DAOvVaw11MY-aB6AiOqfCFuL8XTKZ

 

참조사이트 :

http://stackoverflow.com/questions/4236568/android-scrollview-adds-extra-padding-on-top-and-bottom-of-child-imageview

Android ScrollView adds extra padding on top and bottom of child imageview

I have a problem with rendering a ScrollView. Essentially, the layout is fixed header and footer with a scrollview in the middle. The idea is that when the screen keyboard is activated for the cont...

stackoverflow.com

 

 

 

ImageView imageView = (ImageView) findByViewId(R.id.imageView);

imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);

imageView.setAdjustViewBounds(true);

반응형

댓글