mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-19 13:01:17 +01:00
bug fix
This commit is contained in:
parent
d76c3d791b
commit
6fae7ec6e7
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user