diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c3229e3f7..a8b1362e1 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -27,7 +27,8 @@
+ android:configChanges="orientation|screenSize"
+ android:windowSoftInputMode="adjustResize" />
map = new LinkedHashMap();
+ LinkedHashMap map = new LinkedHashMap();
for (int i = 0; i < Math.min(keys.length, values.length); ++i) {
map.put(keys[i], values[i]);
}
- if(map.containsKey(county)) {
+ if (map.containsKey(county)) {
county = map.get(county);
}
- if (!email.isEmpty() && !password.isEmpty() && !county.isEmpty()){
+ if (!email.isEmpty() && !password.isEmpty() && !county.isEmpty()) {
new LoginTask(this).execute(email, password, county);
} else {
Toast.makeText(this, R.string.data_text, Toast.LENGTH_SHORT).show();
}
}
+
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent ev) {
+
+ if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+ mTouchPosition = ev.getY();
+ }
+ if (ev.getAction() == MotionEvent.ACTION_UP) {
+ mReleasePosition = ev.getY();
+
+ if (mTouchPosition - mReleasePosition == 0 ) {
+ View view = getCurrentFocus();
+ if (view != null && (ev.getAction() == MotionEvent.ACTION_UP || ev.getAction() == MotionEvent.ACTION_MOVE) && view instanceof EditText && !view.getClass().getName().startsWith("android.webkit.")) {
+
+ int scrcoords[] = new int[2];
+ view.getLocationOnScreen(scrcoords);
+ float x = ev.getRawX() + view.getLeft() - scrcoords[0];
+ float y = ev.getRawY() + view.getTop() - scrcoords[1];
+ if (x < view.getLeft() || x > view.getRight() || y < view.getTop() || y > view.getBottom()) {
+ ((InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow((this.getWindow().getDecorView().getApplicationWindowToken()), 0);
+ }
+ }
+ }
+ }
+ return super.dispatchTouchEvent(ev);
+ }
}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 77d173385..7b6c2e61e 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,87 +1,62 @@
-
+ android:layout_height="match_parent">
-
+
+
-
+
-
+
-
+
-
+
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_started.xml b/app/src/main/res/layout/activity_started.xml
index 6bbedd942..3053e610c 100644
--- a/app/src/main/res/layout/activity_started.xml
+++ b/app/src/main/res/layout/activity_started.xml
@@ -22,7 +22,8 @@
tools:layout_constraintBottom_creator="1"
app:layout_constraintBottom_toBottomOf="parent"
tools:layout_constraintLeft_creator="1"
- android:layout_marginBottom="185dp" />
+ android:layout_marginBottom="228dp"
+ app:layout_constraintHorizontal_bias="0.503" />
+ app:layout_constraintHorizontal_bias="0.503" />