Relative Notation in Properties

The remaining properties of relevance to RelativeLayout take as a value the identity of a widget in the container. To identify and reference widgets this way, follow these steps:

1. Put identifiers (android:id attributes) on all elements that you will need to address, of the form @+id/____

2. Reference other widgets using the same identifier value without the plus sign (@id/...).

For example, ifWidget A is identified as @+id/widget a, Widget B can refer to Widget A in one of its own properties via the identifier @id/widget a.

0 0

Post a comment