Skip to content

Commit

Permalink
Adding Geo Widgets to ODK Core
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Nordling authored and jnordling committed Apr 29, 2016
1 parent 0c6ecac commit 72b8acf
Show file tree
Hide file tree
Showing 166 changed files with 1,963 additions and 2,270 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build
.idea
local.properties
*.iml
.DS_Store
2 changes: 1 addition & 1 deletion collect_app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dependencies {
androidTestCompile 'com.android.support.test:runner:0.3'
androidTestCompile 'com.android.support.test:rules:0.3'
androidTestCompile 'com.android.support:support-annotations:23.1.0'
androidTestCompile 'com.android.support:support-v13:23.1.0'
androidTestCompile 'com.android.support:support-v4:23.3.0'
androidTestCompile 'junit:junit:4.12'
testCompile 'junit:junit:4.12'
}
6 changes: 6 additions & 0 deletions collect_app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
android:name=".activities.GeoPointActivity"
android:label="@string/app_name" />
<activity android:name=".activities.GeoPointMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity android:name=".activities.GeoPointMapNotDraggableActivity"
android:label="@string/app_name" />
Expand All @@ -202,18 +203,23 @@
<!--android:label="@string/app_name" />-->
<activity
android:name=".activities.GeoPointOsmMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name=".activities.GeoShapeOsmMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name=".activities.GeoShapeGoogleMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name=".activities.GeoTraceOsmMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name=".activities.GeoTraceGoogleMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />

<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.ArrayList;
import java.util.List;

import org.javarosa.core.model.Constants;
import org.javarosa.core.model.FormIndex;
import org.javarosa.form.api.FormEntryCaption;
import org.javarosa.form.api.FormEntryController;
Expand Down Expand Up @@ -279,6 +280,7 @@ public void refreshView() {
if ( !fp.isReadOnly() || (label != null && label.length() > 0) ) {
// show the question if it is an editable field.
// or if it is read-only and the label is not blank.
String answerDisplay = fp.getAnswerText();
formList.add(new HierarchyElement(fp.getLongText(), fp.getAnswerText(), null,
Color.WHITE, QUESTION, fp.getIndex()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import android.location.LocationManager;
import android.location.LocationProvider;
import android.os.Bundle;
import android.view.Window;
import android.widget.Toast;

public class GeoPointActivity extends Activity implements LocationListener {
Expand All @@ -50,6 +51,7 @@ public class GeoPointActivity extends Activity implements LocationListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);

if ( savedInstanceState != null ) {
mLocationCount = savedInstanceState.getInt(LOCATION_COUNT);
Expand Down Expand Up @@ -191,7 +193,7 @@ public void onClick(DialogInterface dialog, int which) {
mLocationDialog.setIcon(android.R.drawable.ic_dialog_info);
mLocationDialog.setTitle(getString(R.string.getting_location));
mLocationDialog.setMessage(getString(R.string.please_wait_long));
mLocationDialog.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.accept_location),
mLocationDialog.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.save_point),
geopointButtonListener);
mLocationDialog.setButton(DialogInterface. BUTTON_NEGATIVE, getString(R.string.cancel_location),
geopointButtonListener);
Expand Down
Loading

0 comments on commit 72b8acf

Please sign in to comment.