Đang chuẩn bị liên kết để tải về tài liệu:
professional android application development phần 10

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Bắt đầu bằng cách tạo ra một dự án ContentSlider mới gồm có một cuối gói, nhập khẩu nhập khẩu nhập khẩu nhập khẩu nhập khẩu nhập | Chapter 11 Advanced Android Development TODO Do something when the animation repeats. public void onAnimationStart Animation _animation TODO Do something when the animation starts. Animated Sliding User Interface Example In this example you ll create a new Activity that uses an Animation to smoothly change the content of the User Interface based on the direction pressed on the D-pad. 1. Start by creating a new Contentslider project featuring a ContentSlider Activity. package com.paad.contentslider import android.app.Activity import android.view.KeyEvent import android.os.Bundle import android.view.animation.Animation import android.view.animation.Animation.AnimationListener import android.view.animation.AnimationUtils import android.widget.TextView public class ContentSlider extends Activity @Override public void onCreate Bundle icicle super.onCreate icicle setContentView R.layout.main 2. Next modify the main.xml layout resource. It should contain a single TextView with the text bold centered and relatively large. xml version 1.0 encoding utf-8 LinearLayout xmlns android http schemas.android.com apk res android android orientation vertical android layout_width fill_parent android layout_height fill_parent TextView android id @ id myTextView android layout_width fill_parent android layout_height fill_parent android gravity center android textStyle bold android textSize 30sp android text CENTER android editable false android singleLine true android layout_margin 10px LinearLayout 365 Chapter 11 Advanced Android Development 3. Then create a series of animations that slides the current View out of and the next View into the frame for each direction left right up and down. Each animation should have its own file. 3.1. Create slide_bottom_in.xml. set xmlns android http schemas.android.com apk res android android interpolator @android anim accelerate_interpolator translate android fromYDelta -100 p android toYDelta 0 android duration 700 set 3.2. Create .

TÀI LIỆU LIÊN QUAN