diff options
Diffstat (limited to 'app/src/main/java/org/marcinzelent/liberavem/AtlasFragment.java')
-rw-r--r-- | app/src/main/java/org/marcinzelent/liberavem/AtlasFragment.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/src/main/java/org/marcinzelent/liberavem/AtlasFragment.java b/app/src/main/java/org/marcinzelent/liberavem/AtlasFragment.java index 6a65b26..f59ff6b 100644 --- a/app/src/main/java/org/marcinzelent/liberavem/AtlasFragment.java +++ b/app/src/main/java/org/marcinzelent/liberavem/AtlasFragment.java @@ -7,6 +7,9 @@ import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.GridView; + +import org.jetbrains.annotations.Nullable; /** @@ -58,6 +61,8 @@ public class AtlasFragment extends Fragment { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } + + ((MainActivity) getActivity()).setActionBarTitle("Atlas"); } @Override @@ -75,6 +80,12 @@ public class AtlasFragment extends Fragment { } @Override + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { + GridView atlasGrid = view.findViewById(R.id.atlas_grid); + atlasGrid.setAdapter(new AtlasGridAdapter(getActivity(), DataKeeper.getInstance().getBirds())); + } + + @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnFragmentInteractionListener) { |