본문 바로가기
[android] Volley URL related issue( bug ) at GingerBread. - java.io.IOException: Malformed ipv6 address: android, Volley URL related issue(bug) at GingerBread. - java.io.IOException: Malformed ipv6 address: [En] If you use Volley network library with GingerBread and the below version devices, you might encounter URLMalformedException with this kind of message. java.io.IOException: Malformed ipv6 address: It it known issue about the URL class. The problem happens when the host part contains port num.. 2013. 10. 5.
[java] 한글 판별 코드 자바, 한글 판별 코드 요즘 모바일 웹에서 이름을 한글로만 입력해야 한다거나, 아이디를 영문과 숫자로만 입력해야 한다거나 하는 등의 제약사항이 있는 경우가 많이 있다. 영문과 숫자로만 구성되었는지는 Patterns 를 이용해 쉽게 매치가 가능하지만, 한글은 판별하기가 조금 힘들었다. 그 이유인즉 TextWatcher 를 이용하여 아예 한글이 아니면 입력이 안되도록 하려고 하는데, 'ㄱ', 'ㅏ' 와 같이 자음이나 모음만 존재하는 경우의 경우도 판별해야 하기에 Patterns 로 매칭하기가 쉽지 않았다. 그래서 찾아낸 것이 바로 이 코드. Character.UnicodeBlock 을 사용한다. Character.UnicodeBlock unicodeBlock = Character.UnicodeBlock.of.. 2013. 10. 5.
[android] process 이야기 안드로이드, process 이야기. System 이 process 를 죽였을 경우, 2.2 ( Froyo ) 이전 버전에서는 무조건 새로 시작하였고, 그 이후로는 onCreate + Bundle 로 다시 state 를 복구해준다. Activity 들은 모두 destroy 되고 다시 재생성되는 그런 패턴이다. 메모리가 부족하거나 사용안한지 30분이 지나거나 하는 조건 하에 destroy 된다. 2.2, 30분, activity, Android, Bundle, Destroy, froyo, onCreate, process, process kill, state, state 복구, System, 메모리 부족, 안드로이드, 재생성, 프로세스 2013. 10. 3.
[android] eclipse shows "overlaps the location of another project" error when importing. eclipse shows "overlaps the location of another project" error when importing. ( android ) [En] When eclipse shows such an error message, you can just import the project as the [General] - [Existing Projects into Workspace]. Everything is gonna be ok!! [Kr] 이클립스가 이런 에러를 내뿜을 때는 그냥 [General] - [Existing Projects into Workspace] 를 이용하여 import 하면 된다. 그럼 모든것이 해결!! Android, eclipse, error, existing pr.. 2013. 10. 3.
How to generate class diagram using eclipse. How to generate class diagram using eclipse. [En] Using eclipse add-on named ObjectAid UML Explorer, you can draw the class diagram very easily. [Help] - [Install New Software] - [Add] Name : ObjectAid UML ExplorerLocation : http://www.objectaid.net/update Proceed installation. After finishing installation, you can find [ObjectAid UML Diagram] - [Class Diagram] when you click "New" button. Make .. 2013. 10. 1.
[android] TransitionDrawable 을 잘 쓰면 훌륭한 애니메이션이 될 수 있다. TransitionDrawable 을 잘 쓰면 훌륭한 애니메이션이 될 수 있다. TransitionDrawable 의 존재는 익히 알고 있었으나, 드디어 테스트를 해 보았다. TransitionDrawable 은 2개의 이미지를 setting 해놓고 transition 을 시키면, fade in, fade out 효과처럼 이미지가 교체된다. 더 놀라운 것은 매우 부드럽게 된다는 것이며, 2개 이상의 이미지도 충분히 소화할 수 있고, 수치만 바꿈으로서 바뀌는 속도를 쉽게 조절할 수 있다. 자 이 위대한 녀석이 얼마나 간단하게 구현되는지예제 코드 ( example code ) 를 통해서 알아보자. ImageView imageView = new ImageView( this );TransitionDrawable.. 2013. 10. 1.
[android] how to improve the performance of WebView Android, How to improve the performance of WebView webview 의 성능을 향상시키기 위해 여러가지 이야기가 돌아다니는데, 가장 general 하게 통용되는 녀석은 cache 를 쓰지 않는 방법으로 보인다. WebView.getSettings().setCacheMode( WebSettings.LOAD_NO_CACHE ); 사실 Cache 를 쓰는것은 성능상의 이슈 때문인데..안드로이드 프레임워크상의 에러인지, 아니면 모바일 단말의 특성상 cache 처리를 위해 여러번의 network connection 을 하지 않고, 무조건 한번에 가져오는 것이 빠른것인지 ( contents 사이즈가 작다는 가정 하에 ) 정확한 이유는 알 수 없지만, 여튼 Cache 를 사용하지.. 2013. 9. 26.
[android] Data 안전하게 저장하기, 안드로이드, Data 안전하게 저장하기. SharedPreference 와 SQLite 만 사용한다면 별로 걱정할 일이 없다.만약 File I/O API 를 직접 이용하면 문제가 된다.ext4 파일 시스템은 YAFFS ( 과거 안드로이드가 채택한 파일 시스템 ) 에 비해 훨씬 적극적으로 버퍼를 활용한다. 따라서 write() 와 close() 메서드를 호출했다고 해서 데이터가 실제 플래쉬 메모리에 저장되었다고 단언할 수 없다. 따라서 데이터를 저장할 때는 RandomAccessFile 의 synchronous 모드를 사용하는 것이 좋다. 이렇게 사용하면 내부적으로 fsync() 를 호출한다. FileOutputStream 을 사용하게 되면 다음과 같이 sync 를 시켜주어야 한다. public stati.. 2013. 9. 25.
[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.I.. 2013. 9. 24.
반응형