Unfortunately these classes are not known by any handy names Instead they are

Unfortunately these classes are not known by any

This preview shows page 15 - 22 out of 78 pages.

Unfortunately, these classes are not known by any handy names. Instead, they are named for the kind of functionality they provide. Some of the classes that fall into this category include: RecyclerView GridView ImageSwitcher ScrollView ListView It can be helpful to consider these objects as different kinds of View browsers, or container classes. A ListView displays each View control as a list item, and the user can browse between the individual controls using vertical scrolling capability.
Image of page 15

Subscribe to view the full document.

Using Built-in Layout Classes The types of layouts built into the Android SDK framework include: LinearLayout RelativeLayout FrameLayout TableLayout GridLayout These layouts are derived from: android.view.ViewGroup
Image of page 16
Using Built-in Layout Classes (Cont’d) android:layout_attribute_name=" value“ All layouts, regardless of their type, have basic layout attributes. Layout attributes apply to any child View control within that layout. You can set layout attributes at runtime programmatically, but ideally you set them in the XML layout files using the syntax we see here.
Image of page 17

Subscribe to view the full document.

Using Built-in Layout Classes (Cont’d) There are several layout attributes that all ViewGroup objects share. These include size attributes and margin attributes. Find these basic layout attributes in the ViewGroup.LayoutParams class. The margin attributes enable each child View within a layout to have padding on each side. Find these attributes in the ViewGroup.MarginLayoutParams classes. There are also a number of ViewGroup attributes for handling child View drawing bounds and animation settings.
Image of page 18