TAILIEUCHUNG - Lập trình Androi part 03

Tất cả các ngôn ngữ lập trình hoặc sách môi trường bắt đầu với những phổ biến, "Hello, World!" Trình diễn. Đây chỉ là đủ của một chương trình để chứng minh bạn có thể xây dựng mọi thứ. Tuy nhiên, điển hình Hello, World! chương trình không có tương tác (ví dụ, nó chỉ bãi các từ một giao diện điều khiển), và do đó, nó thực sự nhàm chán. | Chapter Creating a Skeleton Application Every programming language or environment book starts off with the popular Hello World demonstration. This is just enough of a program to prove you can build things. However the typical Hello World program has no interactivity . it just dumps the words to a console and so it s really boring. This chapter demonstrates a simple project but one using Advanced Push-Button Technology and the current time making it a bit more interesting than the typical Hello World demo. Begin at the Beginning As described in the previous chapter to work with anything in Android you need a project. If you are using tools that are not Android-enabled you can use the android create project script found in the tools directory in your SDK installation. You will need to pass to android create project the API target the directory where you want the skeleton generated the name of the default activity and the Java package where all of this should reside android create project --target 2 --path path to my project dir --activity Now --package You can also download the project directories of the samples shown in this book in a ZIP file on the Apress web site. These projects are ready for use you do not need to run android create project on those unpacked samples. Your project s src directory contains the standard Java-style tree of directories based on the Java package you used when you created the project . results in src com commonsware android . Inside the innermost directory you should find a pregenerated source file named which is where your first activity will go. 17 CHAPTER 3 Creating a Skeleton Application This activity will contain a single button that displays the time that the button was last pushed or the time the application was started if the button has not been pushed . NOTE If you downloaded the source files from the Apress web site you can just use the Skeleton Now project .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.