Attached are 2 photos one when the list is populated using the onCreateView when the app starts(white text) and the other is whenever the SetList() method is called
https://i.sstatic.net/QHNEL.png
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
ListView lv = (ListView) rootView.findViewById(R.id.listView1);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(((MainActivity)getActivity()).getApplicationContext(), android.R.layout.simple_list_item_1,((MainActivity)getActivity()).Logs);
lv.setAdapter(adapter);
return rootView;
}
https://i.sstatic.net/8uTe1.png
public void SetList()
{
ListView lv = (ListView) findViewById(R.id.listView1);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,Logs);
lv.setAdapter(adapter);
}