Skip to content

Commit

Permalink
Fix issue with long touch not working after resuming app (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
christiancoleman authored and omkarmoghe committed Jul 24, 2016
1 parent 46be738 commit 2a65345
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
12 changes: 11 additions & 1 deletion app/src/main/java/com/omkarmoghe/pokemap/views/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

EventBus.getDefault().register(this);
pref = new PokemapSharedPreferences(this);

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
Expand All @@ -50,6 +49,17 @@ protected void onCreate(Bundle savedInstanceState) {
.commit();
}

@Override
public void onStart(){
super.onStart();
EventBus.getDefault().register(this);
}

@Override
public void onResume(){
super.onResume();
}

@Override
public void onStop() {
super.onStop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,19 @@ public static MapWrapperFragment newInstance() {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
}
}

@Override
public void onStart(){
super.onStart();
EventBus.getDefault().register(this);
}

@Override
public void onResume() {
super.onResume();
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Expand Down Expand Up @@ -212,11 +220,6 @@ public void onAttach(Context context) {
super.onAttach(context);
}

@Override
public void onResume() {
super.onResume();
}

@Override
public void onDetach() {
super.onDetach();
Expand Down

0 comments on commit 2a65345

Please sign in to comment.