본문 바로가기
[Android] Material Design 개략적으로 알아보기~ Implementing Material Design in Your Android App http://android-developers.blogspot.kr/2014/10/implementing-material-design-in-your.html Material Design 은 Android 5.0 ( Lollipop, LOS ) 부터 등장한 안드로이드의 디자인이다. 전반적인 Animation 에 대한 가이드는 아래 링크를 참조하면 좋다.https://material.io/guidelines/motion/material-motion.html Tangible Surfaces * Shadow 아래와 같이 xml 에서 elevation 을 주면, z axis 로 이동한 효과를 내며, system 에서 dynam.. 2017. 4. 10.
[android] ListVIew 의 transcriptMode.. ( 추가된 item 으로 focus 이동 ) [android] ListVIew 의 transcriptMode.. ( 추가된 item 으로 focus 이동 ) 이놈 때문에 한참을 해맸다... android:transcriptMode 는 새로운 item 이 add 되었을 때 focus 이동을 할지를 결정하는 속성이다. disabled, normal, alwaysScroll 이렇게 3개의 값이 들어갈 수 있다. disabled기본 값으로 새로운 아이템 추가에 무대응이다. normaldata set이 change 되었을 때 ( 새로운 녀석이 추가되면 ) + 마지막 아이템을 보고 있었다면, 새로 추가된 마지막 아이템쪽으로 focus 를 이동시킨다. alwaysScrolldata set 이 change 되었을 때 현재 보고 있는 item 이 어떤 녀석인지 상.. 2016. 12. 22.
[android] Localize 에 대한 이야기. [android] Localize 에 대한 이야기. 참조 : http://blog.danlew.net/2014/09/08/what-should-i-localize/?utm_source=Android+Weekly&utm_campaign=c1f6bc0d27-Android_Weekly_119&utm_medium=email&utm_term=0_4eb677ad19-c1f6bc0d27-337262377 - xml 에 string 을 작성할 때 string res 를 사용하는 것이 localize 에 대한 기본이다. 보통 Lint 도 이 방법을 추천하지만, lint 가 잡아내지 못하는 항목들도 많다. - Lint 가 잡아내는 xml 항목들 android:text android:hint android:contentDe.. 2016. 11. 10.
WeakHashMap 에 대해 제대로 이해하자. WeakHashMap 에 대해 제대로 이해하자. - WeakHashMap 은 일반적인 HashMap 과 동일하지만 key 가 weak reference 된 형태이다. - WeakHashMap 을 가장 잘 이해하는 용어는 이렇다. "더 이상 일반적인 방법인 key 로 value 를 retrive 할 수 없을 때 key/value pair 를 제거한다." 따라서 string 은 WeakHashMap 의 key 로 적합하지 못하다. string 은 JVM 에 의해 다른 곳에 store 되어 항상 strong reference 로 남을 것이다. 다시 말하자면 string 을 key 로 사용할 것이라면 WeakHashMap 을 쓸 이유가 없다. - Primitive Boxing object 들도 key 로 사용하.. 2016. 10. 13.
[android] PageTransformer 와 함께 하는 ViewPager 의 화려한 animation [android] PageTransformer 와 함께 하는 ViewPager 의 화려한 animation 참조 : https://medium.com/@BashaChris/the-android-viewpager-has-become-a-fairly-popular-component-among-android-apps-its-simple-6bca403b16d4 -ViewPager.PageTransformater interface 를 구현하면 매번 screen transition 이 발생할 때마다 tansformPage() 함수가 불린다. -position 값은 screen 의 center 로 부터 해당 page 가 어디에 위치하느냐를 나타낸다.page 가 screen 전체를 가득 채웠을 때에는 0 값을 가진다... 2016. 10. 4.
[android] RecyclerView 에 대한 맛보기 이야기 [android] RecyclerView 에 대한 맛보기 이야기 참조 : https://www.bignerdranch.com/blog/recyclerview-part-1-fundamentals-for-listview-experts/ -RecyclerView 는 ListView 에 대비하여 다음과 같은 일들을 하지 않는다. 1. List Item 들을 화면에 배치하지 않는다. -> LayoutManager 가 이 일을 맡아서 한다.2. View 들의 animation 을 관장하지 않는다. -> ItemAnimator 가 이 일을 맡아서 한다.3. Scrolling 외의 touch event 를 관장하지 않는다. -RecyclerView 는 가급적 listview 본연의 일에만 집중하고 view, anima.. 2016. 9. 23.
[android] button 에 shake anim 효과 주기 [android] button 에 shake anim 효과 주기 참조 : http://frogermcs.github.io/InstaMaterial-concept-part-3-feed-and-comments-buttons/ CycleInterpolator 는 api level 1 부터 있던 녀석.정해진 숫자의 cycle 로 animation 을 반복한다.변경은 사인 곡선을 따른다. btn.startAnimation(AnimationUtils.loadAnimation(this, R.anim.shake_anim)); Android, anim, animation, animationutils, api level, Button, cycleinterpolator, cycles.. 2016. 9. 22.
[android] Render thread & Ripple ( Ripple 흉내내기 ) [android] Render thread & Ripple ( Ripple 흉내내기 ) 참조 : http://frogermcs.github.io/InstaMaterial-concept-part-3-feed-and-comments-buttons/ -Animation 등이 조금 더 general 하게 발전하면서, 모든 View operation 을 UI Thread ( Main Thread ) 에서만 처리하던 것이 문제가 되고 있다. 그래서 롤리팝에서부터는 Render thread 라는 게 생겨나서 rendering 과 main thread 가 분리되었다.Main thread 에서 atomic animation 을 만들어서 render thread 로 넘긴다.그래서 Rendering thread 에서 ani.. 2016. 9. 8.
[android] ViewAnimator 뭐하는 녀석이야? [android] ViewAnimator 뭐하는 녀석이야? - ViewAnimator 는 FrameLayout 을 상속한 녀석으로 view 간의 switching 이 있을 때 animation 을 하는 녀석. -ViewAnimator 안에 view 들을 넣고, viewAnimator.showPrevious() 나 viewAnimator.showNext() 를 호출하면, child view 들이 순차적으로 animation 하며 나타났다 사라졌다 한다. -index 를 통해서도 view 의 visibility 를 control 할 수 있다.viewAnimator.setDisplayChild( int index ) -animation 은 setInAnimation() 과 setOutAnimation() 을 .. 2016. 9. 5.
반응형