본문 바로가기
프로그래밍 놀이터/안드로이드, Java

[android] how to remove extra padding( or margin ) in the GridView

by 돼지왕 왕돼지 2013. 9. 24.
반응형


 android, how to remove extra padding( or margin ) in the GridView

 


 android, how to remove extra padding( or margin ) in the GridView


[En]


GingerBread and below versions show strange effect at the GridView. Sometimes it introduces extra padding or margin which was not set by programmer. I think the fragmentation of android and the various versions are a huge disaster to the programmer. BTW, there's solution for removing those unexpected extra padding or margin.

In the sense of xml, what you have to do is just add following xml code.


android:listSelector="@null"


In my opinion, setting list selector causes unexpected padding or margin is bug.







[Kr]

GingerBread 이하의 단말에서는 GridView 를 사용하다 보면 이상하게 주어지지 않은 패딩 혹은 여백값이 설정되곤 한다. 안드로이드의 버전차이와 파편화의 문제는 정말 심각한 것 아닌가 싶은데.. 여기에도 여튼 해결책은 있다.

 xml 버전으로 보았을 때 다음과 같은 코드가 추가되어야 한다.


android:listSelector="@null"


사실 list selector 를 주어준다고 이상한 여백이 생기는 건 말도 안 되는 것 같고..bug 이지 않을까 싶다.




반응형

댓글