コード例 #1
0
 private List<String> getPlacesTypesLabel() {
   final List<String> labels = new ArrayList<String>(placesTypesList.length);
   for (final PlacesTypes placeType : placesTypesList) {
     labels.add(placeType.getLabel(getApplicationContext()));
   }
   return labels;
 }
コード例 #2
0
    public void onItemSelected(
        final AdapterView<?> parent, final View view, final int position, final long id) {
      typesFilter.clear();

      // check which spinner triggered the listener
      switch (parent.getId()) {
          // country spinner
        case R.id.spinner_place_types:
          // filterList
          final PlacesTypes placeType = placesTypesList[position];
          typesFilter.add(placeType.toString());
          break;
      }
    }