Lập trình Androi part 54

Android là "miễn phí như trong bia" cho các nhà sản xuất thiết bị, vì nó là một dự án mã nguồn mở. Do đó, các nhà sản xuất thiết bị có carte blanche để làm những gì họ muốn với Android khi họ đặt nó trên các thiết bị của họ. Điều này có nghĩa là bề rộng của sự lựa chọn cho người sử dụng thiết bị, những người sẽ có thể có các thiết bị Android trong tất cả các hình dạng, kích cỡ, và màu sắc. . | Chapter Dealing with Devices Android is free as in beer for device manufacturers as it is an open source project. Hence device manufacturers have carte blanche to do what they want with Android as they put it on their devices. This means a breadth of choices for device users who will be able to have Android devices in all shapes sizes and colors. This also means developers will have some device differences and idiosyncrasies to take into account. This chapter will give you some tips and advice for dealing with these device-specific issues to go along with the screen size material in Chapter 36. This App Contains Explicit Instructions Originally the only Android device was the T-Mobile G1. Hence if you were writing an Android application you could assume the existence of a hardware QWERTY keyboard a trackball for navigation and so on. Now other devices . HTC Magic exist with different hardware capabilities . no keyboard . Ideally your application can work regardless of the existence of various types of hardware. Some applications though will be unusable without certain hardware characteristics. For example a full-screen game may rely on a hardware keyboard or trackball to indicate player actions soft keyboards and touchscreens may be insufficient. Fortunately starting with Android you can add explicit instructions telling Android what you need so your application is not installed on devices lacking such hardware. In addition to using the target ID system to indicate the level of device that your project is targeting you can use a new element to specify hardware that is required for your application to run properly. You can add one or more usesconfiguration elements inside the manifest element. Each uses-configuration element specifies one valid configuration of hardware with which your application will work. At the present time there are five possible hardware requirements you can specify this way android reqFiveWayNav Indicates you .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
2    68    2    02-06-2024
Đã 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.