|
|
|
@ -1141,15 +1141,13 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
|
|
|
|
for (int i=0; i<getChildCount(); i++) {
|
|
|
|
|
View child = getChildAt(i);
|
|
|
|
|
ii = infoForChild(child);
|
|
|
|
|
if (ii != null && ii.position == mCurItem) {
|
|
|
|
|
if (child.requestFocus(focusDirection)) {
|
|
|
|
|
if (ii != null && ii.position == mCurItem && child.requestFocus(focusDirection)) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void sortChildDrawingOrder() {
|
|
|
|
|
if (mDrawingOrder != DRAW_ORDER_DEFAULT) {
|
|
|
|
@ -1264,24 +1262,6 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
|
|
|
|
private Parcelable adapterState;
|
|
|
|
|
private ClassLoader loader;
|
|
|
|
|
|
|
|
|
|
public SavedState(Parcelable superState) {
|
|
|
|
|
super(superState);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void writeToParcel(Parcel out, int flags) {
|
|
|
|
|
super.writeToParcel(out, flags);
|
|
|
|
|
out.writeInt(position);
|
|
|
|
|
out.writeParcelable(adapterState, flags);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
|
|
|
|
return "FragmentPager.SavedState{"
|
|
|
|
|
+ Integer.toHexString(System.identityHashCode(this))
|
|
|
|
|
+ " position=" + position + "}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static final Parcelable.Creator<SavedState> CREATOR
|
|
|
|
|
= ParcelableCompat.newCreator(new ParcelableCompatCreatorCallbacks<SavedState>() {
|
|
|
|
|
@Override
|
|
|
|
@ -1294,6 +1274,10 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
public SavedState(Parcelable superState) {
|
|
|
|
|
super(superState);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SavedState(Parcel in, ClassLoader loader) {
|
|
|
|
|
super(in);
|
|
|
|
|
if (loader == null) {
|
|
|
|
@ -1303,6 +1287,21 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
|
|
|
|
adapterState = in.readParcelable(loader);
|
|
|
|
|
this.loader = loader;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void writeToParcel(Parcel out, int flags) {
|
|
|
|
|
super.writeToParcel(out, flags);
|
|
|
|
|
out.writeInt(position);
|
|
|
|
|
out.writeParcelable(adapterState, flags);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
|
|
|
|
return "FragmentPager.SavedState{"
|
|
|
|
|
+ Integer.toHexString(System.identityHashCode(this))
|
|
|
|
|
+ " position=" + position + "}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1956,12 +1955,10 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
|
|
|
|
if (DEBUG) Log.v(TAG, "Starting unable to drag!");
|
|
|
|
|
mIsUnableToDrag = true;
|
|
|
|
|
}
|
|
|
|
|
if (mIsBeingDragged) {
|
|
|
|
|
// Scroll to follow the motion event
|
|
|
|
|
if (performDrag(y)) {
|
|
|
|
|
if (mIsBeingDragged && performDrag(y)) {
|
|
|
|
|
ViewCompat.postInvalidateOnAnimation(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2811,13 +2808,11 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
|
|
|
|
View child = getChildAt(i);
|
|
|
|
|
if (child.getVisibility() == VISIBLE) {
|
|
|
|
|
ItemInfo ii = infoForChild(child);
|
|
|
|
|
if (ii != null && ii.position == mCurItem) {
|
|
|
|
|
if (child.requestFocus(direction, previouslyFocusedRect)) {
|
|
|
|
|
if (ii != null && ii.position == mCurItem && child.requestFocus(direction, previouslyFocusedRect)) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|