https://www.uplabs.com/posts/c/resources/tutorial
Sách Android HAY lên mua :
Android Studio Development Essentials - Android 6 Edition
http://www.techotopia.com/index.php/Android_Studio_Development_Essentials_-_Android_6_Edition
Android Material Design: Expanding/Collapsing ActionBar/Toolbar and more animations when scrolling screen
http://www.devexchanges.info/2015/10/android-material-design.html
Làm Ứng Dụng Thời Tiết :
http://www.edmtdev.com/Archive/2016/9/Android-Studio-Tutorial--79-Weather-App-Intro
Essentials of Android App Development and More Essentials LiveLessons
http://www.informit.com/store/essentials-of-android-app-development-and-more-essentials-9780134493817
Android User Interface Design: Implementing Material Design for Developers (2nd Edition) (Usability) 2nd Edition
https://www.amazon.com/Android-User-Interface-Design-Implementing/dp/0134191404/ref=sr_1_1?ie=UTF8&qid=1478659345&sr=8-1&keywords=material+design+androidGetting Started with Activity & Fragment Transitions (part 1)
Xem chi tiết tại : http://www.androiddesignpatterns.com/2014/12/activity-fragment-transitions-in-android-lollipop-part1.html
This post gives a brief overview ofTransitions and introduces the new Activity & Fragment transition APIs that were added in Android 5.0 Lollipop. This is the first of a series of posts I will be writing on the topic:- Part 1: Getting Started with Activity & Fragment Transitions
- Part 2: Content Transitions In-Depth
- Part 3a: Shared Element Transitions In-Depth
- Part 3b: Postponed Shared Element Transitions
- Part 3c: Implementing Shared Element Callbacks (coming soon!)
- Part 4: Activity & Fragment Transition Examples (coming soon!)
We begin by answering the following question: what is a
Transition?
What is a Transition?
Activity and Fragment transitions in Lollipop are built on top of a relatively new feature in Android called Transitions.
Introduced in KitKat, the transition framework provides a convenient
API for animating between different UI states in an application. The
framework is built around two key concepts: scenes and transitions. A scene defines a given state of an application’s UI, whereas a transition defines the animated change between two scenes.When a scene changes, a
Transition has two main responsibilities:- Capture the state of each view in both the start and end scenes, and
- Create an
Animatorbased on the differences that will animate the views from one scene to the other.
Activity
which fades its views in or out when the user taps the screen. We can
achieve this effect with only a few lines using Android’s transition
framework, as shown in the code1 below:public class ExampleActivity extends Activity implements View.OnClickListener {
private ViewGroup mRootView;
private View mRedBox, mGreenBox, mBlueBox, mBlackBox;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mRootView = (ViewGroup) findViewById(R.id.layout_root_view);
mRootView.setOnClickListener(this);
mRedBox = findViewById(R.id.red_box);
mGreenBox = findViewById(R.id.green_box);
mBlueBox = findViewById(R.id.blue_box);
mBlackBox = findViewById(R.id.black_box);
}
@Override
public void onClick(View v) {
TransitionManager.beginDelayedTransition(mRootView, new Fade());
toggleVisibility(mRedBox, mGreenBox, mBlueBox, mBlackBox);
}
private static void toggleVisibility(View... views) {
for (View view : views) {
boolean isVisible = view.getVisibility() == View.VISIBLE;
view.setVisibility(isVisible ? View.INVISIBLE : View.VISIBLE);
}
}
}
VISIBLE on screen:
Video 1.1 - Running the example transition above using a
Fade, Slide, and Explode. Click to play.- A click is detected and the developer calls
beginDelayedTransition(), passing the scene root and aFadetransition as the arguments. The framework immediately calls the transition’scaptureStartValues()method for each view in the scene and the transition records each view’s visibility. - When the call returns, the developer sets each view in the scene to
INVISIBLE. - On the next display frame, the framework calls the transition’s
captureEndValues()method for each view in the scene and the transition records each view’s (recently updated) visibility. - The framework calls the transition’s
createAnimator()method. The transition analyzes the start and end values of each view and notices a difference: the views areVISIBLEin the start scene butINVISIBLEin the end scene. TheFadetransition uses this information to create and return anAnimatorSetthat will fade each view’salphaproperty to0f. - The framework runs the returned
Animator, causing all views to gradually fade out of the screen.

Không có nhận xét nào:
Đăng nhận xét