This commit is contained in:
nuclearfog 2023-07-26 23:26:41 +02:00
parent d76c3d791b
commit 6fae7ec6e7
No known key found for this signature in database
GPG Key ID: 03488A185C476379
3 changed files with 3 additions and 3 deletions

View File

@ -139,6 +139,7 @@ public class MainActivity extends AppCompatActivity implements ActivityResultCal
Serializable data = savedInstanceState.getSerializable(KEY_USER_SAVE);
if (data instanceof User) {
currentUser = (User) data;
setCurrentUser(currentUser);
}
}

View File

@ -120,7 +120,7 @@ public class ProfileActivity extends AppCompatActivity implements OnScrollChange
/**
* scrollview position threshold to lock/unlock child scrolling
*/
private static final int SCROLL_THRESHOLD = 10;
private static final int SCROLL_THRESHOLD = 50;
/**
* color of the profile image placeholder

View File

@ -43,7 +43,7 @@ public class LockableConstraintLayout extends ConstraintLayout {
float deltaX = ev.getX() - xPos;
float deltaY = ev.getY() - yPos;
// lock x-axis when swiping up/down
if (!xLock && Math.abs(deltaY) > Math.abs(deltaX) * 3.0f) {
if (!xLock && Math.abs(deltaY) > Math.abs(deltaX) * 2.0f) {
xLock = true;
}
// detect scroll down, then aquire scroll lock
@ -61,7 +61,6 @@ public class LockableConstraintLayout extends ConstraintLayout {
case MotionEvent.ACTION_UP:
// remove locks on gesture end
xLock = false;
yLock = false;
break;
}
return yLock;