コード例 #1
0
 private void initConditions(Context context) {
   slog.p(TAG, "initConditions geologyIndex " + geologyIndex);
   ArrayList<String> str = createArrayList(bean.geoObjects.get(geologyIndex).conditions);
   if (adapterCondition != null) {
     adapterCondition.clear();
     adapterCondition.addAll(str);
     adapterCondition.notifyDataSetChanged();
   } else {
     adapterCondition = new ArrayAdapter<String>(context, getAdapterLayoutID(), str);
     mSpinnerCondition.setAdapter(adapterCondition);
   }
 }
コード例 #2
0
 private void initSpinnerGeologyValue(Context context) {
   slog.p(TAG, "initSpinnerGeologyValue ");
   ArrayList<String> str = createArrayList(bean.geoObjects);
   if (adapterGeology != null) {
     adapterGeology.clear();
     adapterGeology.addAll(str);
     adapterGeology.notifyDataSetChanged();
   } else {
     adapterGeology = new ArrayAdapter<String>(context, getAdapterLayoutID(), str);
     mSpinnerGeology.setAdapter(adapterGeology);
     mSpinnerGeology.setSelection(geologyIndex);
   }
 }
コード例 #3
0
    private void initConditiontValue(Context context) {
      slog.p(
          TAG, "initConditions geologyIndex " + geologyIndex + " conditionIndex " + conditionIndex);

      ArrayList<Values> arrsys =
          bean.geoObjects.get(geologyIndex).conditions.get(conditionIndex).values;
      //			ArrayList<String> str = createArrayList(arrsys);

      ArrayList<String> str = new ArrayList<String>();

      getAllChildStr(arrsys, str);

      if (adapterConditionValue != null) {
        adapterConditionValue.clear();
        adapterConditionValue.addAll(str);
        adapterConditionValue.notifyDataSetChanged();
      } else {
        adapterConditionValue = new ArrayAdapter<String>(context, getAdapterLayoutID(), str);
        mSpinnerConditionValue.setAdapter(adapterConditionValue);
      }
    }