Open main menu

CDOT Wiki β

Changes

MAP524/DPS924 Lecture 4

326 bytes added, 20:48, 12 July 2015
Views
* NumberPicker: Lets the user choose a number. Needs to be configured in java before it works to have a minimum and maximum value using setMinValue() and setMaxValue().
* Spinner: Like the number picker but with any strings as values to pick from. You'll need an Adapter similar to the one you used with the AutoCompleteTextView in the last lab, otherwise it will show nothing.
 
= Fragments =
 
Were introduced with 3.0 and made things much more complicated. But if you're developing for phones and tablets they actually make things easier.
 
Sometimes (like with the date picker) you'll have a hard time to avoid using a fragment, but almost always you can avoid writing your own fragment if you want to.