|
|
@@ -1,63 +0,0 @@
|
|
|
-/*
|
|
|
- * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
|
|
|
- */
|
|
|
-package kr.co.zumo.app.lifeplus.view.screen.main;
|
|
|
-
|
|
|
-import android.os.Parcelable;
|
|
|
-import android.util.SparseArray;
|
|
|
-
|
|
|
-/**
|
|
|
- * MainModelHelper
|
|
|
- * <pre>
|
|
|
- * </pre>
|
|
|
- *
|
|
|
- * @author 민효동
|
|
|
- * @version 1.0
|
|
|
- * @history 민효동 [2018-11-21] [최초 작성]
|
|
|
- * @since 2018-11-21
|
|
|
- */
|
|
|
-public class MainModelHelper {
|
|
|
- private static MainModelHelper ourInstance = new MainModelHelper();
|
|
|
-
|
|
|
- public static MainModelHelper getInstance() {
|
|
|
- return ourInstance;
|
|
|
- }
|
|
|
-
|
|
|
- private MainModelHelper() {
|
|
|
- }
|
|
|
-
|
|
|
- private SparseArray<Parcelable> states;
|
|
|
-
|
|
|
- /**
|
|
|
- * 메인 뷰의 카테고리 스크롤러(횡 스크롤)의 위치를 저장한다.
|
|
|
- *
|
|
|
- * @param index
|
|
|
- * @param data
|
|
|
- */
|
|
|
- public void addInstanceState(int index, Parcelable data) {
|
|
|
- if (null == states) {
|
|
|
- states = new SparseArray<>();
|
|
|
- }
|
|
|
- states.append(index, data);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 메인 카테고리 스크롤러(횡 스크롤)의 위치를 반환한다.
|
|
|
- *
|
|
|
- * @param index
|
|
|
- * @return
|
|
|
- */
|
|
|
- public Parcelable getInstanceState(int index) {
|
|
|
- if (null == states) {
|
|
|
- states = new SparseArray<>();
|
|
|
- }
|
|
|
- return states.get(index);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * dispose
|
|
|
- */
|
|
|
- public void dispose() {
|
|
|
- states = null;
|
|
|
- }
|
|
|
-}
|