Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractAppFragment里面的getCurrentState函数逻辑是不是有点问题 #271

Open
hucaser opened this issue Oct 5, 2015 · 0 comments

Comments

@hucaser
Copy link

hucaser commented Oct 5, 2015

在包org.qii.weiciyuan.ui.interfaces中的AbstractAppFragment类里面有一个getCurrentState函数,这个函数的逻辑是不是写的有点问题?函数代码如下

protected int getCurrentState(Bundle savedInstanceState) {
        if (savedInstanceState != null) {
            isFirstTimeStartFlag = false;
            return ACTIVITY_DESTROY_AND_CREATE;
        }

        if (!isFirstTimeStartFlag) {
            return SCREEN_ROTATE;
        }

        isFirstTimeStartFlag = false;
        return FIRST_TIME_START;
    }

savedInstanceState不为空就直接断定为ACTIVITY_DESTROY_AND_CREATE,感觉不对啊!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant