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/ObservationsFragment.java
parent4de306375a33b2abd067e65658a46d45cba5e56e (diff)
Riced the app, added Atlas and About views
Diffstat (limited to 'app/src/main/java/org/marcinzelent/liberavem/ObservationsFragment.java')
-rw-r--r--app/src/main/java/org/marcinzelent/liberavem/ObservationsFragment.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/org/marcinzelent/liberavem/ObservationsFragment.java b/app/src/main/java/org/marcinzelent/liberavem/ObservationsFragment.java
index e2df607..02e5512 100644
--- a/app/src/main/java/org/marcinzelent/liberavem/ObservationsFragment.java
+++ b/app/src/main/java/org/marcinzelent/liberavem/ObservationsFragment.java
@@ -65,6 +65,8 @@ public class ObservationsFragment extends Fragment {
mParam2 = getArguments().getString(ARG_PARAM2);
}
+ ((MainActivity) getActivity()).setActionBarTitle("Observations");
+
DataKeeper.getInstance().clearFragments();
}
@@ -85,7 +87,7 @@ public class ObservationsFragment extends Fragment {
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
// Find the view pager that will allow the user to swipe between fragments
- ViewPager viewPager = (ViewPager) view.findViewById(R.id.viewpager);
+ ViewPager viewPager = view.findViewById(R.id.viewpager);
// Create an adapter that knows which fragment should be shown on each page
ViewPagerAdapter adapter = new ViewPagerAdapter(getContext(), getChildFragmentManager());
@@ -94,7 +96,7 @@ public class ObservationsFragment extends Fragment {
viewPager.setAdapter(adapter);
// Give the TabLayout the ViewPager
- TabLayout tabLayout = (TabLayout) view.findViewById(R.id.sliding_tabs);
+ TabLayout tabLayout = view.findViewById(R.id.sliding_tabs);
tabLayout.setupWithViewPager(viewPager);
FloatingActionButton fab = view.findViewById(R.id.fab);