Changed the way to check if a view is empty, fixed some strings, fixed fastscroller alignment.
This commit is contained in:
parent
450aca9149
commit
8ba0c72037
43 changed files with 185 additions and 204 deletions
|
|
@ -91,11 +91,11 @@ public class FastScroller extends FrameLayout {
|
|||
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||
mHandle.setPressed(true);
|
||||
|
||||
mInitialBarHeight = mBar.getHeight();
|
||||
mInitialBarHeight = getBarHeight();
|
||||
mLastPressedYAdjustedToInitial = event.getY() + mHandle.getY() + mBar.getY();
|
||||
} else if (event.getActionMasked() == MotionEvent.ACTION_MOVE) {
|
||||
float newHandlePressedY = event.getY() + mHandle.getY() + mBar.getY();
|
||||
int barHeight = mBar.getHeight();
|
||||
int barHeight = getBarHeight();
|
||||
float newHandlePressedYAdjustedToInitial =
|
||||
newHandlePressedY + (mInitialBarHeight - barHeight);
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ public class FastScroller extends FrameLayout {
|
|||
int verticalScrollRange = mRecyclerView.computeVerticalScrollRange()
|
||||
+ mRecyclerView.getPaddingBottom();
|
||||
|
||||
int barHeight = mBar.getHeight();
|
||||
int barHeight = getBarHeight();
|
||||
float ratio = (float) scrollOffset / (verticalScrollRange - barHeight);
|
||||
|
||||
int calculatedHandleHeight = (int) ((float) barHeight / verticalScrollRange * barHeight);
|
||||
|
|
@ -245,4 +245,8 @@ public class FastScroller extends FrameLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int getBarHeight() {
|
||||
return mBar.getHeight();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue