본문 바로가기
[Java8 In Action] #12 새로운 날짜와 시간 API [Java8 In Action] #12 새로운 날짜와 시간 API Java8 In Action 내용을 보며 정리한 내용입니다.정리자는 기존에 Java8 을 한차례 rough 하게 공부한 적이 있고, Kotlin 역시 공부한 적이 있습니다.위의 prerequisite 가 있는 상태에서 추가적인 내용만 정리한 내용이므로, 제대로 공부를 하고 싶다면 책을 구매해서 보길 권장합니다! 12.1. LocalDate, LocalTime, Instant, Duration, Period 12.1.1. LocalDate 와 LocalTime 사용 -LocalDate 는 시간을 제외한 날짜를 표현하는 불변 객체.이 녀석은 어떤 시간대 정보도 포함하지 않는다. -정적 팩토리 메소드 of 로 LocalDate 인스턴스를 만들 .. 2019. 1. 1.
[ios/tutorial] CABasicAnimation, CATransition, CAKeyframeAnimation, CALayer, CAAnimationGroup ( Core Animation ) [ios/tutorial] CABasicAnimation, CATransition, CAKeyframeAnimation, CALayer, CAAnimationGroup ( Core Animation ) http://warmz.tistory.com/entry/Core-Animation-CABasicAnimation-CAKeyframeAnimation-CATransition-CAAnimationGroup -위 블로그가 CoreAnimation 전체에 대해 잘 정리해놓았다.아래 섹션은 각각의 Part 에 대해 조금 더 세세한 정보를 추가해 놓은 것. CABasicAnimation https://developer.apple.com/library/mac/documentation/GraphicsImaging/Ref.. 2017. 12. 1.
[ios/tutorial] Core Animation 모든 것!! [ios/tutorial] Core Animation 모든 것!! 참고 : https://www.objc.io/issues/12-animations/animations-explained/ -Animation 을 수행하는 방법은 크게 2가지. 1. UIView 의 class method “animateWithDuration:” 을 사용하는 방법2. Core Animation 을 사용하는 방법. Simple Animation 이 아니라면 Core Animation 을 사용하는 것이 추천된다.훨씬 코드의 가독성이 좋고, 더 많은 기능을 제공한다.But, 더 많은 학습을 필요로 한다. 물론 애플의 권장사항은 할수만 있다면 항상 UIKit 에서 제공되는 Animation 을 사용하길 원한다. -Core Anima.. 2017. 11. 30.
[android] 특정 위치에 popup window 띄우기 [android] 특정 위치에 popup window 띄우기 http://frogermcs.github.io/InstaMaterial-concept-part-4-feed-context-menu/ -꼭 popup window 를 띄우지 않아도, LinearLayout 등을 통해서도 popup window 형태를 충분히 띄울 수 있다. -메뉴를 표시하는 LinearLayout 를 하나 만든다. -menu 를 표시하는 action 이 들어오면, 메뉴 view 를 만들고, ViewTreeObserver 에 addOnPreDrawListener 를 등록한다. -listener callback 에서는 먼저 pre draw listener 를 해지해주고, menu 의 위치를 잡아준다. -위치를 잡는것은, 기준점이 되.. 2017. 7. 12.
[android] list view 의 아이템 하나씩 나타나는 animation 효과 주기 [android] list view 의 아이템 하나씩 나타나는 animation 효과 주기 http://frogermcs.github.io/Instagram-with-Material-Design-concept-part-2-Comments-transition/ -// view 는 list의 itemViewview.setTranslationY(100); // 원래 등장하는 위치보다 조금 더 내려주고..view.setAlpha(0.f); // visibility 를 꺼준 후..view.animate() .translationY(0) .alpha(1.f) .setStartDelay(delayEnterAnimation ? 20 * (position) : 0) // position 마다 시간차를 조금 주고.. .s.. 2017. 7. 11.
[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] 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.
[Django] 파이썬 웹 프로그래밍 - Django 의 핵심 기능 #2 [Django] 파이썬 웹 프로그래밍 - Django 의 핵심 기능 #2 * 4.4.1. HTML 에서의 폼 -HTTP 프로토콜 중 폼에서 사용할 수 있는 HTTP 메소드는 GET 과 POST 뿐이다.장고는 이 중에서도 폼 처리에는 POST 방식만을 사용하고 있다.추가적으로 장고는 보안을 강화하기 위해 CSRF 방지 기능을 제공한다. * 4.4.2. 장고의 폼 기능 -장고는 폼 처리를 위해 다음 3가지 기능을 제공한다. 폼 생성에 필요한 데이터를 폼 클래스로 구조화하기 폼 클래스의 데이터를 랜더링하여 HTML 폼 만들기 사용자로부터 제출된 폼과 데이터를 수신하고 처리하기 -장고의 모델 클래스가 데이터베이스 테이블의 논리적인 구조 및 동작 기능, 우리에게 보여지는 방식들을 기술.. 2016. 12. 15.
[android] bitmap 전환 fade in & fade out sample code 안드로이드, bitmap 전환 fade in & fade out sample code 뭐 완벽하며 부드러운 구현은 아니지만, 그래도 image 가 그냥 "확" 바뀌는 어색함을 막기 위해서 fade in, fade out 을 어떻게 이용할 수 있을까 idea 를 제시한다. public class MainActivity extends Activity { private int[] resIds = new int[]{ R.drawable.black, R.drawable.blue };private int index = 0;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentVie.. 2013. 8. 19.
반응형