ViewWrapper. And the result (Figure 9‑3) is what you would expect, visually.
This
GetRatingBar
If null
FindViewById
Return
GetLabel
If null
FindViewById
Return
And the result (Figure 9‑3) is what you would expect, visually.
Figure 9‑3. The RateListDemo application, as initially launched
This includes the toggled checkboxes turning their words into all caps (Figure 9‑4).
Figure 9‑4. The same application, showing a top‑rated word
…And Checking It Twice
The rating list in the previous section works, but implementing it is very tedious. Worse, much of that tedium would not be reusable except in very limited circumstances. We can do better.
What we’d really like is to be able to create a layout like this:
where, in our code, almost all of the logic that might have referred to a before “just works” with the we put in the layout:
Дата добавления: 2015-05-16; просмотров: 731;