Skip to content

Commit

Permalink
#117 #148 Instantiate constraints in the 2 places that seem to make s…
Browse files Browse the repository at this point in the history
…ense.
  • Loading branch information
hallahan committed May 14, 2016
1 parent fda469b commit 6ecab23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public TagListAdapter(Activity activity, OSMElement osmElement) {
tagMap = new LinkedHashMap<>();

if (ODKCollectHandler.isODKCollectMode()) {
Constraints constraints = new Constraints(osmElement);
Map<String,String> tags = osmElement.getTags();
Map<String, String> readOnlyTags = new LinkedHashMap<>(tags);
ODKCollectData odkCollectData = ODKCollectHandler.getODKCollectData();
Expand Down
13 changes: 11 additions & 2 deletions app/src/main/java/org/redcross/openmapkit/tagswipe/TagEdit.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import com.spatialdev.osm.model.OSMElement;

import org.redcross.openmapkit.Constraints;
import org.redcross.openmapkit.odkcollect.ODKCollectData;
import org.redcross.openmapkit.odkcollect.ODKCollectHandler;
import org.redcross.openmapkit.odkcollect.tag.ODKTag;
Expand All @@ -33,6 +34,7 @@ public class TagEdit {
private static LinkedHashMap<String, TagEdit> tagEditHash;
private static List<TagEdit> tagEdits;
private static OSMElement osmElement;
private static Constraints constraints;

private String tagKey;
private String tagVal;
Expand All @@ -48,12 +50,19 @@ public class TagEdit {
*/
private CheckBox editTextCheckBox;
private EditText checkBoxEditText;


/**
* Factory Method that gives collection of instances.
*
* @return
*/
public static List<TagEdit> buildTagEdits() {
int idx = 0;
tagEditHash = new LinkedHashMap<>();
tagEdits = new ArrayList<>();
osmElement = OSMElement.getSelectedElements().getFirst();
constraints = new Constraints(osmElement);

int idx = 0;
Map<String, String> tags = osmElement.getTags();

// Tag Edits for ODK Collect Mode
Expand Down

0 comments on commit 6ecab23

Please sign in to comment.