Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[fixbug][issue-74] Attach view (and clear mIsStateSaved flag) in both…
… onStart and onResume
  • Loading branch information
senneco committed Jan 16, 2017
1 parent e490c05 commit 8742bb7
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 0 deletions.
Expand Up @@ -21,6 +21,13 @@ protected void onCreate(Bundle savedInstanceState) {
getMvpDelegate().onCreate(savedInstanceState);
}

@Override
protected void onStart() {
super.onStart();

getMvpDelegate().onAttach();
}

@Override
protected void onResume() {
super.onResume();
Expand Down
Expand Up @@ -25,6 +25,15 @@ public void onCreate(Bundle savedInstanceState) {
getMvpDelegate().onCreate(savedInstanceState);
}

@Override
public void onStart() {
super.onStart();

mIsStateSaved = false;

getMvpDelegate().onAttach();
}

public void onResume() {
super.onResume();

Expand Down
Expand Up @@ -12,6 +12,10 @@ public void onCreate(Bundle savedInstanceState) {
throw new RuntimeException("Stub!");
}

public void onStart() {
throw new RuntimeException("Stub!");
}

public void onResume() {
throw new RuntimeException("Stub!");
}
Expand Down
Expand Up @@ -22,6 +22,13 @@ protected void onCreate(Bundle savedInstanceState) {
getMvpDelegate().onCreate(savedInstanceState);
}

@Override
protected void onStart() {
super.onStart();

getMvpDelegate().onAttach();
}

@Override
protected void onResume() {
super.onResume();
Expand Down
Expand Up @@ -23,6 +23,15 @@ public void onCreate(Bundle savedInstanceState) {
getMvpDelegate().onCreate(savedInstanceState);
}

@Override
public void onStart() {
super.onStart();

mIsStateSaved = false;

getMvpDelegate().onAttach();
}

public void onResume() {
super.onResume();

Expand Down
Expand Up @@ -13,6 +13,10 @@ public void onCreate(Bundle savedInstanceState) {
throw new RuntimeException("Stub!");
}

public void onStart() {
throw new RuntimeException("Stub!");
}

public void onResume() {
throw new RuntimeException("Stub!");
}
Expand Down
Expand Up @@ -13,6 +13,10 @@ protected void onCreate(Bundle savedInstanceState) {
throw new RuntimeException("Stub!");
}

protected void onStart() {
throw new RuntimeException("Stub!");
}

protected void onResume() {
throw new RuntimeException("Stub!");
}
Expand Down

0 comments on commit 8742bb7

Please sign in to comment.