original source : https://youtu.be/7ep4effngGc

image

material design이 도입되면서 제공되는 새로운 widgets의 예를 보여주고 있다. 

 AppBarLayout 부터 TextInputLayout까지 모두 새로운 widgets에 해당한다.

image

=========================================================

.

.

drawer layout 과 navigation view , navigation drawer 비교

https://stackoverflow.com/questions/44176576/navigation-drawer-vs-navigation-view-which-is-best-and-what-is-the-diffrence

image

NavigationView를 DrawerLayout과 함께 사용한 방법을 아래서 보여주고 있다.

image
image
image
image

=========================================================

.

.

image
image
image

=========================================================

.

.

image
image
image

=========================================================

.

.

image

=========================================================

.

.

image

=========================================================

.

.

image

=========================================================

.

.

image
image

=========================================================

.

.

AppBarLayout과 CollapsingToolbarLayout
참고) 실제 예시
https://youtu.be/wCuM_di5M9Y?t=50

image
image

=========================================================

.

.

image
image

=========================================================

.

.

image
image

=========================================================

.

.

android studio 에서 blank activity template을 선택하는 경우 기본적으로 material design widgets이 어느 정도 설정되어서 시작된다.

image

VIEW ANIMATION , PROPERTY ANIMATION 둘다 같은 작업을 수행할수있다. 차이점이 있다면 view animation의 경우 animation후에 보이는 것은 변경되었을지 모르지만 실제 존재하는 위치는 같으므로 클릭을 한다고 하면 본래 위치에 클릭해야 해당 view가 이벤트를 받아들이게 된다.Their state changes but their property does not change. 

 ObjectAnimator를 이용하는 것은 property animation이다. ObjectAnimator is a subclass of ValueAnimator

TranslateAnimationRotateAnimationScaleAnimationAlphaAnimation 을 이용하는 것은 view animation이다.  

When using View Animations, use XML instead of doing it programmatically. Using XML files, it is more readable and can be shared among other views.

참조 https://youtu.be/_UWXqFBF86U?t=204

basics  3 types of Animations:

  1. Property Animations— They are used to alter property of objects (Views or non view objects). We specify certain properties(like translateX, TextScaleX) of the objects to change. Various characteristics of animation which can be manipulated are animation duration, whether to reverse it and for how many times we want to repeat the animation etc. They were introduced in Android 3.0 (API level 11).
  2. View Animations — They are used to do simple animations like changing size, position, rotation, control transparency. They are easy to build and are very fast but have their own constraints. For eg — Their state changes but their property does not change. View animations will be covered in part 2.
  3. Drawable Animations — This is used to do animation using drawables. An XML file specifying various list of drawables is made which are run one by one just like a roll of a film. This is not much used so I won’t cover it.

property animation 

  •      – ObjectAnimator를 이용한다. ( ValueAnimator를 기반으로 한다 )
  •      – AnimatorSet 를 이용 여러 view들의 animations을 동시에 진행가능하다. ( with()를 사용하기도한다 )
  •      – 하나의 view에 대한 여러 animation을 동시에 진행하는 경우 ViewPropertyAnimator 를 이용한다. 
animateTextView.animate().rotation(360f).y(500f).setDuration(2000);

View Animation

  • Tween Animation — These are the animations applied on a view which is responsible for scaling, translating, rotating or fading a view (either together or one by one).
  • Frame Animation — These animations are applied using various drawables. In this, we just have to specify a list of drawables in the XML code and the animation runs just like frames of a video.

View Animations are not much used because the same thing can be using ViewPropertyAnimator object which is much faster and readable. Frame animation is similar to Drawable Animation. The more important thing is to understand the new Transition framework which is much useful and provide beautiful animations.

API 21이후에 추간된 ANIMATION

Shared Element Transitions 

Activity Transitions

Circular Reveal

Shared Element Transitions 

http://blogs.quovantis.com/how-to-apply-shared-element-transitions-in-android/


참고자료) 

view animation brief explanation

https://youtu.be/_UWXqFBF86U

A beginners guide to implement Android Animations — Part 1 (2 part series)

https://medium.com/@shubham.bestfriendforu/a-beginners-guide-to-implement-android-animations-part-1-2-part-series-b5fce1fc85

VIEW ANIMATION VS PROPERTY ANIMATION IN ANDROID

https://mahbubzaman.wordpress.com/2015/06/03/view-animation-vs-property-animation-in-android/

Sometimes we need to animate some view in our application. Here is a sample code for translate a view over x axis from its location.


Button bt;
bt = (Button) findViewById(R.id.bt);
bt.setOnClickListener(this);

TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 300, Animation.RELATIVE_TO_SELF, Animation.RELATIVE_TO_SELF);
animation.setDuration(1000);
animation.setFillAfter(true);
bt.setAnimation(animation);

But the problem of this code is if you want to click this button after animate you can not, why lets read the documentation from android developer site

disadvantage of the view animation system is that it only modified where the View was drawn, and not the actual View itself. For instance, if you animated a button to move across the screen, the button draws correctly, but the actual location where you can click the button does not change, so you have to implement your own logic to handle this.

more

To solve this issue we will use ObjectAnimator class to animate our view.


ObjectAnimator animXNext = ObjectAnimator.ofFloat(bt, "translationX", Animation.RELATIVE_TO_SELF, 300);
animXNext.setDuration(1000);
animXNext.start();

Now you can click on the button. Enjoy

VIEW ANIMATION , PROPERTY ANIMATION 둘다 같은 작업을 수행할수있다. 차이점이 있다면 view animation의 경우 animation후에 보이는 것은 변경되었을지 모르지만 실제 존재하는 위치는 같으므로 클릭을 한다고 하면 본래 위치에 클릭해야 해당 view가 이벤트를 받아들이게 된다.Their state changes but their property does not change. 

 ObjectAnimator를 이용하는 것은 property animation이다. ObjectAnimator is a subclass of ValueAnimator

TranslateAnimationRotateAnimationScaleAnimationAlphaAnimation 을 이용하는 것은 view animation이다.  

When using View Animations, use XML instead of doing it programmatically. Using XML files, it is more readable and can be shared among other views.

참조 https://youtu.be/_UWXqFBF86U?t=204

basics  3 types of Animations:

  1. Property Animations— They are used to alter property of objects (Views or non view objects). We specify certain properties(like translateX, TextScaleX) of the objects to change. Various characteristics of animation which can be manipulated are animation duration, whether to reverse it and for how many times we want to repeat the animation etc. They were introduced in Android 3.0 (API level 11).
  2. View Animations — They are used to do simple animations like changing size, position, rotation, control transparency. They are easy to build and are very fast but have their own constraints. For eg — Their state changes but their property does not change. View animations will be covered in part 2.
  3. Drawable Animations — This is used to do animation using drawables. An XML file specifying various list of drawables is made which are run one by one just like a roll of a film. This is not much used so I won’t cover it.

property animation 

  •      – ObjectAnimator를 이용한다. ( ValueAnimator를 기반으로 한다 )
  •      – AnimatorSet 를 이용 여러 view들의 animations을 동시에 진행가능하다. ( with()를 사용하기도한다 )
  •      – 하나의 view에 대한 여러 animation을 동시에 진행하는 경우 ViewPropertyAnimator 를 이용한다. 
animateTextView.animate().rotation(360f).y(500f).setDuration(2000);

View Animation

  • Tween Animation — These are the animations applied on a view which is responsible for scaling, translating, rotating or fading a view (either together or one by one).
  • Frame Animation — These animations are applied using various drawables. In this, we just have to specify a list of drawables in the XML code and the animation runs just like frames of a video.

View Animations are not much used because the same thing can be using ViewPropertyAnimator object which is much faster and readable. Frame animation is similar to Drawable Animation. The more important thing is to understand the new Transition framework which is much useful and provide beautiful animations.

API 21이후에 추간된 ANIMATION

Shared Element Transitions 

Activity Transitions

Circular Reveal

Shared Element Transitions 

http://blogs.quovantis.com/how-to-apply-shared-element-transitions-in-android/


참고자료) 

view animation brief explanation

https://youtu.be/_UWXqFBF86U

A beginners guide to implement Android Animations — Part 1 (2 part series)

https://medium.com/@shubham.bestfriendforu/a-beginners-guide-to-implement-android-animations-part-1-2-part-series-b5fce1fc85

VIEW ANIMATION VS PROPERTY ANIMATION IN ANDROID

https://mahbubzaman.wordpress.com/2015/06/03/view-animation-vs-property-animation-in-android/

Sometimes we need to animate some view in our application. Here is a sample code for translate a view over x axis from its location.


Button bt;
bt = (Button) findViewById(R.id.bt);
bt.setOnClickListener(this);

TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 300, Animation.RELATIVE_TO_SELF, Animation.RELATIVE_TO_SELF);
animation.setDuration(1000);
animation.setFillAfter(true);
bt.setAnimation(animation);

But the problem of this code is if you want to click this button after animate you can not, why lets read the documentation from android developer site

disadvantage of the view animation system is that it only modified where the View was drawn, and not the actual View itself. For instance, if you animated a button to move across the screen, the button draws correctly, but the actual location where you can click the button does not change, so you have to implement your own logic to handle this.

more

To solve this issue we will use ObjectAnimator class to animate our view.


ObjectAnimator animXNext = ObjectAnimator.ofFloat(bt, "translationX", Animation.RELATIVE_TO_SELF, 300);
animXNext.setDuration(1000);
animXNext.start();

Now you can click on the button. Enjoy

Swift 3 how to make background image fill the entire UIView?

scrollview 내부에 auto layout 이 사용된경우

( storyboard를 이용하거나 programmatically 하거나 )에는 scrollview에도 auto layout을 적용해야 한다. 그렇지 않으면 black screen만 나오는 경우가 생긴다.

https://stackoverflow.com/a/42743971/3151712

https://stackoverflow.com/a/42743371/3151712