RestoreScrollView.java 828 B

1234567891011121314151617181920212223242526272829303132333435
  1. package com.epson.mobilephone.common.license;
  2. import android.content.Context;
  3. import android.util.AttributeSet;
  4. import android.widget.ScrollView;
  5. /**
  6. * 自定义滚动页面
  7. */
  8. public class RestoreScrollView extends ScrollView {
  9. private int mLastY;
  10. public RestoreScrollView(Context context) {
  11. super(context);
  12. mLastY = 0;
  13. }
  14. public RestoreScrollView(Context context, AttributeSet attributeSet) {
  15. super(context, attributeSet);
  16. mLastY = 0;
  17. }
  18. public RestoreScrollView(Context context, AttributeSet attributeSet, int i) {
  19. super(context, attributeSet, i);
  20. }
  21. protected void onScrollChanged(int i, int i2, int i3, int i4) {
  22. super.onScrollChanged(i, i2, i3, i4);
  23. mLastY = i2;
  24. }
  25. public int getLastY() {
  26. return mLastY;
  27. }
  28. }