Back to project page dissertation-project.
The source code is released under:
MIT License
If you think the Android project dissertation-project listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.fyp.resilience.fragment; //w ww. ja v a 2 s. c om import android.app.ListFragment; import android.os.Bundle; import android.widget.BaseAdapter; import com.fyp.resilience.adapter.ClientListAdapter; import com.fyp.resilience.event.ClientListChanged; import de.greenrobot.event.EventBus; public class ClientsFragment extends ListFragment { private BaseAdapter mListAdapter; @Override public void onDestroy() { super.onDestroy(); EventBus.getDefault().unregister(this); } @Override public void onActivityCreated(final Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); EventBus.getDefault().register(this); mListAdapter = new ClientListAdapter(getActivity()); setListAdapter(mListAdapter); } public void onEventMainThread(final ClientListChanged event) { notifyChange(); } private void notifyChange() { mListAdapter.notifyDataSetChanged(); } }