aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <zelent.marcin@gmail.com>2018-04-26 13:34:40 +0200
committermarcinzelent <zelent.marcin@gmail.com>2018-04-26 13:34:40 +0200
commit9ecffe7854da65b39ae13b18be7da425777f1ee8 (patch)
tree431c18a13684d54c656c935ef4fdfcc93e0e81fc /app/src/main/java/org/marcinzelent/liberavem/MainActivity.java
parent4de306375a33b2abd067e65658a46d45cba5e56e (diff)
Riced the app, added Atlas and About views
Diffstat (limited to 'app/src/main/java/org/marcinzelent/liberavem/MainActivity.java')
-rw-r--r--app/src/main/java/org/marcinzelent/liberavem/MainActivity.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/src/main/java/org/marcinzelent/liberavem/MainActivity.java b/app/src/main/java/org/marcinzelent/liberavem/MainActivity.java
index e53a05c..37545b6 100644
--- a/app/src/main/java/org/marcinzelent/liberavem/MainActivity.java
+++ b/app/src/main/java/org/marcinzelent/liberavem/MainActivity.java
@@ -36,7 +36,8 @@ import java.util.List;
public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener,
ObservationsFragment.OnFragmentInteractionListener,
- AtlasFragment.OnFragmentInteractionListener {
+ AtlasFragment.OnFragmentInteractionListener,
+ AboutFragment.OnFragmentInteractionListener {
@Override
@@ -96,9 +97,9 @@ public class MainActivity extends AppCompatActivity
int id = item.getItemId();
//noinspection SimplifiableIfStatement
- if (id == R.id.action_search) {
- return true;
- }
+ //if (id == R.id.action_search) {
+ // return true;
+ //}
return super.onOptionsItemSelected(item);
}
@@ -119,7 +120,7 @@ public class MainActivity extends AppCompatActivity
Intent settingsIntent = new Intent(this, SettingsActivity.class);
startActivity(settingsIntent);
} else if (id == R.id.nav_about) {
-
+ fragmentClass = AboutFragment.class;
} else if (id == R.id.nav_signout) {
FirebaseAuth auth = FirebaseAuth.getInstance();
auth.signOut();
@@ -146,4 +147,8 @@ public class MainActivity extends AppCompatActivity
public void onFragmentInteraction(Uri uri) {
}
+
+ public void setActionBarTitle(String title) {
+ getSupportActionBar().setTitle(title);
+ }
}