diff options
Diffstat (limited to 'app/src/main/java/org/marcinzelent/liberavem/ObservationsFragment.java')
-rw-r--r-- | app/src/main/java/org/marcinzelent/liberavem/ObservationsFragment.java | 6 |
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); |