TAILIEUCHUNG - Lập trình Androi part 06

Container đổ một bộ sưu tập các vật dụng (và có thể chứa con) thành những cấu trúc cụ thể. Nếu bạn muốn có một mẫu với các nhãn trên các lĩnh vực trái và bên phải, bạn cần một container. Nếu bạn muốn nút OK và Cancel để được bên dưới phần còn lại của hình thức này, bên cạnh nhau, và tuôn ra để phía bên phải của màn hình, bạn cần một container. | Chapter Working with Containers Containers pour a collection of widgets and possibly child containers into specific structures. If you want a form with labels on the left and fields on the right you need a container. If you want OK and Cancel buttons to be beneath the rest of the form next to one another and flush to the right side of the screen you need a container. Just from a pure XML perspective if you have multiple widgets beyond RadioButton widgets in a RadioGroup you need a container just to have a root element to place the widgets inside. Most GUI toolkits have some notion of layout management frequently organized into containers. In Java Swing for example you have layout managers like BoxLayout and containers that use them . Box . Some toolkits such as XUL and Flex stick strictly to the box model figuring that any desired layout can be achieved through the correct combination of nested boxes. Android through LinearLayout also offers a box model. In addition Android supports a range of containers that provide different layout rules. In this chapter we will look at several commonly used containers LinearLayout the box model RelativeLayout a rule-based model TableLayout the grid model and ScrollView a container designed to assist with implementing scrolling containers. Thinking Linearly LinearLayout is a box model in which widgets or child containers are lined up in a column or row one after the next. This works in a similar manner to FlowLayout in Java Swing and vbox and hbox in Flex and XUL. Flex and XUL use the box as their primary unit of layout. If you want you can use LinearLayout in much the same way eschewing some of the other containers. Getting the visual representation you want is mostly a matter of identifying where boxes should nest and which properties those boxes should have such as their alignment in relation to other boxes. 39 CHAPTER 6 Working with Containers LinearLayout Concepts and Properties To configure a LinearLayout you have five .

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.