Skip to content

Commit

Permalink
back button fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Byrne committed Feb 15, 2021
1 parent 0981ecc commit 88e311d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/src/main/java/com/example/geochat_hack/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
}
});

back_to_main = findViewById(R.id.back_to_main);
// Assign button methods
back_to_main.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(SettingsActivity.this, MainActivity.class));
}
});

Button addPP = (Button) findViewById(R.id.addpp);
addPP.setOnClickListener(new View.OnClickListener() {
@Override
Expand Down Expand Up @@ -172,15 +181,6 @@ public void onSuccess(Uri uri) {
}
}

back_to_main = findViewById(R.id.back_to_main);
// Assign button methods
back_to_main.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(SettingsActivity.this, MainActivity.class));
}
});

}

}

0 comments on commit 88e311d

Please sign in to comment.