Package org.greenrobot.eventbus.util
Class ErrorDialogFragmentFactory<T>
- java.lang.Object
-
- org.greenrobot.eventbus.util.ErrorDialogFragmentFactory<T>
-
- Direct Known Subclasses:
ErrorDialogFragmentFactory.Honeycomb,ErrorDialogFragmentFactory.Support
public abstract class ErrorDialogFragmentFactory<T> extends java.lang.ObjectFactory to allow injecting a more complex exception mapping; typically you would subclass one ofErrorDialogFragmentFactory.HoneycomborErrorDialogFragmentFactory.Support.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classErrorDialogFragmentFactory.Honeycombstatic classErrorDialogFragmentFactory.Support
-
Field Summary
Fields Modifier and Type Field Description protected ErrorDialogConfigconfig
-
Constructor Summary
Constructors Modifier Constructor Description protectedErrorDialogFragmentFactory(ErrorDialogConfig config)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TcreateErrorFragment(ThrowableFailureEvent event, android.os.Bundle arguments)Returns either a new Honeycomb+ or a new support library DialogFragment.protected java.lang.StringgetMessageFor(ThrowableFailureEvent event, android.os.Bundle arguments)May be overridden to provide custom error messages.protected java.lang.StringgetTitleFor(ThrowableFailureEvent event, android.os.Bundle arguments)May be overridden to provide custom error title.protected TprepareErrorFragment(ThrowableFailureEvent event, boolean finishAfterDialog, android.os.Bundle argumentsForErrorDialog)Prepares the fragment's arguments and creates the fragment.
-
-
-
Field Detail
-
config
protected final ErrorDialogConfig config
-
-
Constructor Detail
-
ErrorDialogFragmentFactory
protected ErrorDialogFragmentFactory(ErrorDialogConfig config)
-
-
Method Detail
-
prepareErrorFragment
protected T prepareErrorFragment(ThrowableFailureEvent event, boolean finishAfterDialog, android.os.Bundle argumentsForErrorDialog)
Prepares the fragment's arguments and creates the fragment. May be overridden to provide custom error fragments.
-
createErrorFragment
protected abstract T createErrorFragment(ThrowableFailureEvent event, android.os.Bundle arguments)
Returns either a new Honeycomb+ or a new support library DialogFragment.
-
getTitleFor
protected java.lang.String getTitleFor(ThrowableFailureEvent event, android.os.Bundle arguments)
May be overridden to provide custom error title.
-
getMessageFor
protected java.lang.String getMessageFor(ThrowableFailureEvent event, android.os.Bundle arguments)
May be overridden to provide custom error messages.
-
-