You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CamotionFragment.java 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.rthoni.camotion.ui.fragments;
  2. import android.content.Context;
  3. import android.os.Bundle;
  4. import android.view.View;
  5. import com.luticate.auth.dbo.LuFullLoginDbo;
  6. import com.luticate.utils.dbo.LuDbo;
  7. import com.luticate.utils.ui.fragments.ViewPaginationFragment;
  8. import com.rthoni.camotion.dbo.LocationDbo;
  9. import org.json.JSONException;
  10. /**
  11. * Created by robin on 12/3/15.
  12. */
  13. public abstract class CamotionFragment<Dbo extends LuDbo, DboView extends View> extends ViewPaginationFragment<Dbo, DboView> {
  14. protected LuFullLoginDbo _fullLoginDbo = null;
  15. protected LocationDbo _currentLocation = null;
  16. @Override
  17. public void onAttach(Context context) {
  18. super.onAttach(context);
  19. try {
  20. _fullLoginDbo = new LuFullLoginDbo();
  21. _fullLoginDbo.fromString(getArguments().getString("CAMOTION_LOGIN_DBO"));
  22. _currentLocation = new LocationDbo();
  23. _currentLocation.fromString(getArguments().getString("CAMOTION_LOCATION_DBO"));
  24. } catch (JSONException e) {
  25. e.printStackTrace();
  26. }
  27. }
  28. @Override
  29. public void onDetach() {
  30. super.onDetach();
  31. _fullLoginDbo = null;
  32. _currentLocation = null;
  33. }
  34. }