Class NetworkAwareActionbarActivity

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected boolean mNetworkAvailable 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      protected void onCreate(Bundle savedInstanceState) 
      void onNetworkAvailable()
      This is called when network connectivity is available and you should be able to carry out network requests.
      void onNetworkUnavailable()
      This is called when network connectivity is unavailable and network requests are expected to fail.
      protected void onPause() 
      protected void onResume() 
      void onRetryAvailable(java.lang.String message, View.OnClickListener retryAction)
      Called when retrying something may be possible.
      void onRetryUnavailable()
      Called when retrying something will not be possible.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mNetworkAvailable

        protected boolean mNetworkAvailable
    • Constructor Detail

      • NetworkAwareActionbarActivity

        public NetworkAwareActionbarActivity()
    • Method Detail

      • onNetworkAvailable

        public void onNetworkAvailable()
        This is called when network connectivity is available and you should be able to carry out network requests.

        If you override this method make sure to call super.onNetworkAvailable if you want the no network view to be dismissed

        Specified by:
        onNetworkAvailable in interface NetworkAware
      • onNetworkUnavailable

        public void onNetworkUnavailable()
        This is called when network connectivity is unavailable and network requests are expected to fail.
        Specified by:
        onNetworkUnavailable in interface NetworkAware
      • onCreate

        protected void onCreate(Bundle savedInstanceState)
      • onResume

        protected void onResume()
      • onPause

        protected void onPause()
      • onRetryAvailable

        public void onRetryAvailable(java.lang.String message,
                                     View.OnClickListener retryAction)
        Description copied from interface: Retryable
        Called when retrying something may be possible.
        Specified by:
        onRetryAvailable in interface Retryable
        Parameters:
        message - A message detailing something about the action that we are going to retry
        retryAction - A listener to invoke which will retry the action
      • onRetryUnavailable

        public void onRetryUnavailable()
        Description copied from interface: Retryable
        Called when retrying something will not be possible.
        Specified by:
        onRetryUnavailable in interface Retryable