TAILIEUCHUNG - Android SDK (phần 4)

Resolution and Density Independence ❘ 117 LISTING 4-23: Level List Drawable resource To select which image to display in code call setImageLevel on the View displaying the Level List Drawable resource, passing in the index of the Drawable you wish to display. (5); The View will display the image corresponding to the index with an equal or greater value to the one specified. Level | Resolution and Density Independence 117 LISTING 4-23 Level List Drawable resource Available for download on level-list xmlns android http apk res android item android maxLevel item android maxLevel item android maxLevel item android maxLevel item android maxLevel item android maxLevel item android maxLevel 0 android drawable 1 android drawable 2 android drawable 4 android drawable 6 android drawable 8 android drawable 10 android drawable @drawable earthquake_0 @drawable earthquake_1 @drawable earthquake_2 @drawable earthquake_4 @drawable earthquake_6 @drawable earthquake_8 @drawable earthquake_10 level-list To select which image to display in code call setimageLevel on the View displaying the Level List Drawable resource passing in the index of the Drawable you wish to display. 5 The View will display the image corresponding to the index with an equal or greater value to the one specified. Level List Drawables are particularly useful when creating Widget layouts. NinePatch Drawable NinePatch or stretchable images are PNG files that mark the parts of an image that can be stretched. NinePatch images must be properly defined PNG files that end in .. The resource identifier for NinePatches is the file name without the trailing .. A NinePatch is a variation of a PNG image that uses a one-pixel border to define the area of the image that can be stretched if the image is enlarged. To create a NinePatch draw single-pixel black lines that represent stretchable areas along the left and top borders of your image. The unmarked sections won t be resized and the relative size of each of the marked sections will remain the same as the image size changes. NinePatches are a powerful tool for creating images for the backgrounds of Views or Activities that may have a variable size. For example Android uses NinePatches to create button borders. RESOLUTION AND DENSITY INDEPENDENCE With the first four Android handsets all .

TỪ KHÓA LIÊN QUAN
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.