본문 바로가기
[android] click 위치로부터 화면(Activity) 전개하는 animation 넣기 [android] click 위치로부터 화면(Activity) 전개하는 animation 넣기 http://frogermcs.github.io/Instagram-with-Material-Design-concept-part-2-Comments-transition/ -y 값을 새로 open 되는 Activity 에 전달한다. -Activity 의 theme 에 background transparent 를 넣고, root view 를 scaleY 로 0.1f 정도 놓는다. -onCreate() 단계에서 scaleY 를 1.f, pivotY 를 전달받은 값, duration 을 200 정도로 설정한 animation 을 root view 에 주면 된다. activity, Android, animation, ba.. 2017. 7. 10.
[android] TextSwitcher ( from API level 1 ) [android] TextSwitcher ( from API level 1 ) http://developer.android.com/reference/android/widget/TextSwitcher.html -TextView 들만을 child 로 가지는 ViewGroup 이다.Label 을 animation 하는 데 유용하다.setText 가 불릴때마다 animation 을 해서 현재 text 를 out 시키고, 새로운 text 를 in 시킨다. -inAnimation 과 outAnimation 을 지정하여 사용한다. -setText 는 animation 을 하지만, setCurrentText 를 하면 현재 보여지고 있는 text 를 그냥 update 하기 때문에 animation 이 없다. -TextS.. 2017. 7. 9.
[android] Material Support Library [android] Material Support Library http://code.hootsuite.com/tips-and-tricks-for-android-material-support-libraryhttps://android-developers.googleblog.com/2014/10/material-design-on-android-checklist.html -material support lib 을 사용하기 위해서는 build.gradle 에 dependency 를 추가해주어야 한다. dependencies { compile 'com.android.support:appcompat-v7:21.0.+'} -App theme 도 바꿔주자. -Activity 도 ActionBarActivity 를 상속받.. 2017. 7. 8.
[android] AbstractAccountAuthenticator 에 대해 알아보자. [android] AbstractAccountAuthenticator 에 대해 알아보자. http://developer.android.com/reference/android/accounts/AbstractAccountAuthenticator.html - 계정을 생성하기 위해서는 AbstractAccountAuthenticator 를 구현한 녀석을 가지고 있어야 한다. 또한 android.accounts.AccountAuthenticator action 을 처리하는 Service 도 구현해야 한다. 해당 service 에서는 Authenticator 의 getIBinder() 를 수행한 녀석을 IBinder 로 return 해주어야 한다. - AuthenticationService 는 다음과 같은 inte.. 2017. 7. 6.
[iOS Study] 병렬 프로그래밍 가이드 ( dispatch source ) [iOS Study] 병렬 프로그래밍 가이드 ( dispatch source ) https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/GCDWorkQueues/GCDWorkQueues.html#//apple_ref/doc/uid/TP40008091-CH103-SW1 About dispatch source -dispatch source 는 low-level system event 를 처리하기 위한 data type 이다. -Timer dispatch source 는 주기적인 noti 를 만든다. -Signal dispatch source 는 UNIX signal 이 도착하면 not.. 2017. 7. 3.
[iOS Study] 병렬 프로그래밍 가이드 ( operation queue ) [iOS Study] 병렬 프로그래밍 가이드 ( operation queue ) https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationObjects/OperationObjects.html#//apple_ref/doc/uid/TP40008091-CH101-SW1 Operation Object 에 대한 이야기 -Operation object 는 NSOperation class 의 인스턴스를 이야기한다.NSOperation class 는 abstract base class 로 subclass 를 구현해야 한다. -NSInvocationOperation 과 NSBlock.. 2017. 7. 2.
[iOS Study] 병렬 프로그래밍 가이드 ( 병렬 앱 디자인 ) [iOS Study] 병렬 프로그래밍 가이드 ( 병렬 앱 디자인 ) https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/ConcurrencyandApplicationDesign/ConcurrencyandApplicationDesign.html#//apple_ref/doc/uid/TP40008091-CH100-SW1 -전통적 방법으로의 복수개의 코어를 사용하는 방법은 여러개의 thread 를 만들어 사용하는 것이다.그러나 thread 를 사용한 코드는 scale 측면에서 좋지 않다.core 가 처리하기 좋은 thread 의 갯수를 아는 것도 쉽지 않고, thread 들을 효율적으.. 2017. 7. 1.
Composite Pattern ( 콤포지션 패턴 ) Composite Pattern ( 콤포지션 패턴 ) https://en.wikipedia.org/?title=Composite_pattern -객체들의 관계를 트리 구조로 구성하여사용자가 단일 객체와 복합 객체 모두 동일하게 다루도록 하는 것이 포인트이다. -Composite pattern 에는 3가지 구성요소가 필요하다.1. 공통적으로 사용하고자 하는 function 을 담은 interface "Component".2. 단일 객체들을 담을 수 있는 복합 객체이며, interface 를 구현한 "Composite". 이 녀석들은 add, remove 함수와 내부적으로 list 를 갖는다.3. 단일 객체에 해당하는 interface 를 구현한 "Leaf". - ADD, Composite, Composit.. 2017. 6. 30.
Visitor Pattern ( 방문자 패턴, visitor 패턴 ) Visitor Pattern ( 방문자 패턴, visitor 패턴 ) https://en.wikipedia.org/?title=Visitor_pattern -객체의 구조와 기능을 분리시키는 패턴.구조는 변하지 않으면서 기능만을 따로 추가하거나 확장되어야 할 경우에 사용하는 패턴이다. -visitor pattern 은 2개의 interface 가 필요하다. 하나는 element 로 visitor 를 맞이하는 accept 라는 함수를 제공한다.다른 하나는 visitor 로 concrete 한 element 를 받아들이는 visit 함수를 제공한다. interface IElement{ void accept(IElementVisitor visitor);} inteface IElementVisitor{ void .. 2017. 6. 29.
반응형