Skip to content

Instantly share code, notes, and snippets.

@VaidotasK
Created July 14, 2018 12:46
Show Gist options
  • Save VaidotasK/18b0435666988e4bed7363ddf695b32a to your computer and use it in GitHub Desktop.
Save VaidotasK/18b0435666988e4bed7363ddf695b32a to your computer and use it in GitHub Desktop.
Pub Fragment in which View.GONE should work
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.place_list, container, false);
final ArrayList<Place> places = new ArrayList<Place>();
places.add(new Place(getString(R.string.church_name_1), getString(R.string.church_address_1), "a",
getString(R.string.church_address_1)));
places.add(new Place("Name", "address", "aaa", "aaaa"));
places.add(new Place("name", "addresss22", "2", "2"));
places.add(new Place("name", "jj", "add", "hh"));
PlaceAdapter adapter = new PlaceAdapter(getActivity(), places);
ListView listView = (ListView) rootView.findViewById(R.id.list);
listView.setAdapter(adapter);
return rootView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment