본문 바로가기
GMT vs. UTC GMT vs. UTC -GMT 는 Greenwich Mean Time 의 약자로 영국의 그리니치 천문대를 기준으로 한 시간이다.그리니치 천문대는 경도 0도에 위치.한국은 GMT + 9 로 GMT 시간에서 + 9시간 한 시간이 한국시이다. -UTC 는 Universal Time Coordinated 의 약자로 GMT 에 기반하며, 1972년 1월 1일 세계 표준시로 규정되었다.그럼 GMT 와 UTC 는 무슨 차이냐?GMT 시간은 그리니치 천문대를 기준으로 하여 지구의 자전 주기와 밀접한 관련이 있다.시간이 흐를 수록 지구의 자전 흐름이 늦어지기 때문에 문제가 될 수 있다.하지만 UTC 는 원자시(세슘 원자의 진동수에 기반)를 사용하여 자전 주기와 무관하다. GMT 와 마찬가지로 한국은 UTC + 9 를 사.. 2017. 6. 6.
Strong / Weak / Dynamic / Static type Strong / Weak / Dynamic / Static type http://nvec.egloos.com/2251285http://en.wikipedia.org/wiki/Strong_and_weak_typing -Dynamic typing 은 변수의 타입이 프로그램의 어느 시점에서든 변경이 가능하고, ( Runtime 에 결정 )Static typing 은 그렇지 않다. ( Compile time 에 결정 ) -Strong type 은 프로그램을 보고 바로 에러를 찾아낼 수 있는 것이고,Weak type 은 그렇지 않다. Strong type 은 해당 type 에 할 수 있는 일들이 명확하게 정의되어 있다.Weak type 은 사용되는 시점에 암시적으로 cast 가 될 수도 있고, ad-hoc pol.. 2017. 6. 5.
[android] VectorDrawable 에 대한 이야기 [android] VectorDrawable 에 대한 이야기 https://blog.stylingandroid.com/vectordrawables-part-1/ -LOS 부터 등장한 녀석으로 SVG 형식으로 xml 을 정의하여 drawable 로 사용할 수 있다. -V 1.4. 이전에서는 android studio 에서는 preview 를 제대로 그리지 못하는 이슈가 있지만, 이후버전에서는 수정됨. -VectorDrawable 을 사용하면 각 해상도에 필요한 res 를 넣어주지 않아도 되서 app size 가 많이 절약된다. -drawable/android.xml 위의 코드는 이 녀석을 그린다. -vector 로 animation 을 하려면 animated-vector 를 정의하여 assign 해줘야 한.. 2017. 6. 2.
[android] xml 의  tool 을 사용하자 [android] xml 의 tool 을 사용하자 https://medium.com/sebs-top-tips/tools-of-the-trade-part-1-f3c1c73de898https://developer.android.com/studio/write/tool-attributes.html -xmlns:tools="http://schemas.android.com/tools" aapt 는 tools: attribute 를 ignore 한다.그래서 실제 apk 에는 들어가지 않는다. - 위와 같이 tools: 를 사용하면 실제 xml 에서 pre draw 할 때는 tools:text 가 android:text 처럼 작동하지만,apk 는 들어가지 않는다. aapt( android asset packaging .. 2017. 5. 30.
[android] LOS visibility change & ripple animation glitch (잔상문제) [android] LOS visibility change & ripple animation glitch (잔상문제) LOS 이상에서 버튼 클릭을 하면 기본적으로 ripple animation 이 발생한다.Animation 도중 visibility 를 gone 으로 만들었다가 나중에 visible 로 다시 만들면,gone 당시 진행중이던 ripple 이 남아있게 되서 visible 이 되는 순간 남아있던 ripple effect 가 보이게 되어 ugly 하다. 이것을 해결하려면..아래의 함수를 통해 해결할 수 있다!! ViewCompat.jumpDrawablesToCurrentState( View ); // examplemyButtonContainer.setVisibility(View.VISIBLE);Vi.. 2017. 5. 29.
[git] 자주쓰는 branch 와 checkout 명령어들 [git] 자주쓰는 branch 와 checkout 명령어들 > git branch// local branch 를 볼 수 있다. > git branch -r// remote branch 를 볼 수 있다. > git branch -a // remote 와 local 모두 볼 수 있다. > git checkout [branchName] // 해당 branchName 으로 checkout 한다. // Remote branch 의 경우에는 Detached HEAD 상태라 이 녀석을 modify 하지는 못 한다. // 참고로 remote branch 는 보통 origin/branchName 의 형태를 갖는다. > git checkout -b [newBranchName] [branchName] // branchNa.. 2017. 5. 26.
[Java] GC 에 대한 이야기 [Java] GC 에 대한 이야기 http://www.javaworld.com/article/2078645/java-se/jvm-performance-optimization-part-3-garbage-collection.html -System.gc() 를 호출하는 것이 GC 를 보장하지 않는다. -gc 가 호출되면 gc 는 자신이 실행되어도 안전한 시점인지 확인 후 실행된다.안전한 시점이라는 것은 지속적인 object allocation 이 아닐 때, optimized CPU instruction 의 중간이 아닐 때 와 같은 경우가 있겠다. -GC 는 여러 가지 variation 이 있지만 다음 두가지는 모든 GC 가 동일하다.1. OOM 이 나지 않도록 사용되지 않는 메모리를 free 시킨다.2. pe.. 2017. 5. 25.
[android] CircularRevealEffect Basic Simple Example [android] Circular Reveal Effect Basic Simple Example - API Level 21 에 등장! ( 5.0, MOS ) - Animator animator = ViewAnimationUtils.createCircularReveal( shape, // animation target view shape.getWidth(), // circle center x 0, // circle center y 0, // circle start radius (float) Math.hypot(shape.getWidth(), shape.getHeight())); // circle end radiusanimator.setInterpolator(new AccelerateDecelerateInt.. 2017. 5. 24.
[android] Custom view state 관리에 대한 내용. [android] Custom view state 관리에 대한 내용. -예를 들어 checked state 가 없는 view 에 checked state 를 추가하려면 다음과 같이 할 수 있다. - 우선 어떤 view 에 Checkable 이라는 interface 를 implement 시키고.. ( android 에 있는 interface ) public interface Checkable{ void setChecked(boolean checked); boolean isChecked(); void toggle();} - setChecked 함수에서 refreshDrawableState() 를 호출하면, int[] onCreateDrawableState(int extraSpace) 가 불린다. privat.. 2017. 5. 23.
반응형