diff options
author | Marcin Zelent <zelent.marcin@gmail.com> | 2018-03-29 23:25:18 +0200 |
---|---|---|
committer | Marcin Zelent <zelent.marcin@gmail.com> | 2018-03-29 23:25:18 +0200 |
commit | 7294c6bd32e362b4c0a64cadbf4dd2c191e1ad8e (patch) | |
tree | 1265a82d6195a11082363d883b4aafa537b6af0b /app/src/main/java/org/marcinzelent/liberavem/MyObservationsFragment.java | |
parent | 0ca89e916444d5e3f42238d36039e53903555276 (diff) |
Added observations tabs
Diffstat (limited to 'app/src/main/java/org/marcinzelent/liberavem/MyObservationsFragment.java')
-rw-r--r-- | app/src/main/java/org/marcinzelent/liberavem/MyObservationsFragment.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/app/src/main/java/org/marcinzelent/liberavem/MyObservationsFragment.java b/app/src/main/java/org/marcinzelent/liberavem/MyObservationsFragment.java new file mode 100644 index 0000000..bcc9067 --- /dev/null +++ b/app/src/main/java/org/marcinzelent/liberavem/MyObservationsFragment.java @@ -0,0 +1,46 @@ +package org.marcinzelent.liberavem; + + +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.ListView; +import android.widget.TextView; + +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; + +/** + * A simple {@link Fragment} subclass. + */ +public class MyObservationsFragment extends Fragment { + + + public MyObservationsFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View rootView = inflater.inflate(R.layout.observations_list, container, false); + + return rootView; + } + + @Override + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { + String[] list = new String[] { + "String 1", + "String 2", + "String 3" + }; + ListView observationsListView = view.findViewById(R.id.observations_list_view); + ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_list_item_1, list); + observationsListView.setAdapter(adapter); + } +} |