Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DeviceListFragment extends ListFragment {
- ArrayList<LaboratoryDevice> deviceArrayList;
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- Log.v("Begin",new Date()+ "starting createView for DeviceListFragment");
- return inflater.inflate(R.layout.content_activity_fragment,container,false);
- //return super.onCreateView(inflater, container, savedInstanceState);
- }
- @Override
- public void onAttach(Context context) {
- super.onAttach(context);
- Log.v("Begin", new Date() + "DeviceListFragment связан с Activity");
- }
- @Override
- public void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- Log.d("Begin", new Date()+"starting DeviceListFragment");
- deviceArrayList = DevicesBase.getDevicesBase(getActivity()).getDeviceArrayList();
- ArrayAdapter<LaboratoryDevice> adapter = new ArrayAdapter<LaboratoryDevice>(getActivity(),
- android.R.layout.simple_list_item_1,
- deviceArrayList);
- setListAdapter(adapter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement