|
@@ -454,18 +454,21 @@ public class ExtendedListFragment extends Fragment implements
|
|
|
* Restore index and position
|
|
|
*/
|
|
|
protected void restoreIndexAndTopPosition() {
|
|
|
- if (mIndexes.size() > 0) {
|
|
|
- // needs to be checked; not every browse-up had a browse-down before
|
|
|
+ if (mIndexes == null || mIndexes.isEmpty()) {
|
|
|
+ Log_OC.d(TAG,"Indexes is null or empty");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- int index = mIndexes.remove(mIndexes.size() - 1);
|
|
|
- final int firstPosition = mFirstPositions.remove(mFirstPositions.size() - 1);
|
|
|
- int top = mTops.remove(mTops.size() - 1);
|
|
|
+ // needs to be checked; not every browse-up had a browse-down before
|
|
|
|
|
|
- Log_OC.v(TAG, "Setting selection to position: " + firstPosition + "; top: "
|
|
|
- + top + "; index: " + index);
|
|
|
+ int index = mIndexes.remove(mIndexes.size() - 1);
|
|
|
+ final int firstPosition = mFirstPositions.remove(mFirstPositions.size() - 1);
|
|
|
+ int top = mTops.remove(mTops.size() - 1);
|
|
|
|
|
|
- scrollToPosition(firstPosition);
|
|
|
- }
|
|
|
+ Log_OC.v(TAG, "Setting selection to position: " + firstPosition + "; top: "
|
|
|
+ + top + "; index: " + index);
|
|
|
+
|
|
|
+ scrollToPosition(firstPosition);
|
|
|
}
|
|
|
|
|
|
private void scrollToPosition(int position) {
|