示例#1
0
 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (resultCode == 1) {
     slopeRG1.clearCheck();
     slopeRG2.clearCheck();
     // slopeTV.setText(data.getStringExtra("slope") + (char)176);
     slopeTV.setText(data.getStringExtra("slope"));
     slopeTV.setVisibility(View.VISIBLE);
     save(LandPKSApplication.getInstance().getPlot()); // ???
   }
 }
示例#2
0
 @Override
 public void save(Plot plot) {
   if (slopeTV.getText() != null && !"".equals(slopeTV.getText().toString())) {
     plot.slope = slopeTV.getText().toString();
   } else {
     // plot.slope = getCheckedSlope();
     String checkedSlope = getCheckedSlope();
     plot.slope = checkedSlope == null ? null : Slope.displayNameLookup.get(checkedSlope).name();
   }
   if (plot.name != null) LandPKSApplication.getInstance().getDatabaseAdapter().addPlot(plot);
 }
  @Override
  public void save(Plot plot) {
    int radioButtonID = crackedRG.getCheckedRadioButtonId();
    if (radioButtonID != -1) {
      // plot.surfaceCracking = "true".equals(crackedRG.findViewById(radioButtonID).getTag());
      plot.surfaceCracking =
          getString(R.string.special_soil_conditions_fragment_surface_cracked)
              .equals(crackedRG.findViewById(radioButtonID).getTag());
    }

    radioButtonID = saltRG.getCheckedRadioButtonId();
    if (radioButtonID != -1) {
      // plot.surfaceSalt = "true".equals(saltRG.findViewById(radioButtonID).getTag());
      plot.surfaceSalt =
          getString(R.string.special_soil_conditions_fragment_surface_salt)
              .equals(saltRG.findViewById(radioButtonID).getTag());
    }

    if (plot.name != null) LandPKSApplication.getInstance().getDatabaseAdapter().addPlot(plot);
  }
示例#4
0
 public String getServerName() {
   return LandPKSApplication.getInstance().getString(serverName);
 }
示例#5
0
 public String getDisplayName() {
   return LandPKSApplication.getInstance().getString(displayName);
 }
示例#6
0
 static {
   for (Slope s : Slope.values()) {
     serverNameLookup.put(LandPKSApplication.getInstance().getString(s.serverName), s);
   }
 }