20.11.2016 Views

ANDROID APP

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

300 บทที่ 11 เทคนิคขั้นสูงสำาหรับพัฒนาแอพบนแอนดรอยด์<br />

android:src="@drawable/mail"<br />

/><br />

<br />

<br />

รูปที่ 11.5 แสดงเลย์เอาต์ของภาพเคลื่อนไหว<br />

ในการแสดงภาพเคลื่อนไหวในวิวนี้ เราจะต้องกำหนดค่าของภาพเคลื่อนไหวลงไปในไฟล์ XML<br />

ด้วย ทำได้โดยไปที่โปรแกรม Eclipse คลิกขวาที่โฟลเดอร์ res/ และเลือกคำสั่ง New → android<br />

XML File และกำหนดชื่อของไฟล์เป็น animated.xml และเลือกชนิดของไฟล์เป็น Animation<br />

หลังจากนั้นเราก็แก้ไขไฟล์เพื่อสร้างคอนเทนต์ ตามที่แสดงในชุดคำสั่งที่ 11.16<br />

ชุดคำสั่งที่ 11.16 res/anim/animated.xml<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!