public class ErrorFragment extends BrandedFragment
Fragment.InstantiationException, Fragment.SavedState
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
Constructor and Description |
---|
ErrorFragment() |
Modifier and Type | Method and Description |
---|---|
Drawable |
getBackgroundDrawable()
Returns the background drawable.
|
View.OnClickListener |
getButtonClickListener()
Returns the button click listener.
|
String |
getButtonText()
Returns the button text.
|
Drawable |
getImageDrawable()
Returns the drawable used for the error image.
|
CharSequence |
getMessage()
Returns the error message.
|
boolean |
isBackgroundTranslucent()
Returns true if the background is translucent.
|
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
Called to have the fragment instantiate its user interface view.
|
void |
onStart()
Called when the Fragment is visible to the user.
|
void |
setBackgroundDrawable(Drawable drawable)
Sets a drawable for the fragment background.
|
void |
setButtonClickListener(View.OnClickListener clickListener)
Set the button click listener.
|
void |
setButtonText(String text)
Sets the button text.
|
void |
setDefaultBackground(boolean translucent)
Sets the default background.
|
void |
setImageDrawable(Drawable drawable)
Sets the drawable to be used for the error image.
|
void |
setMessage(CharSequence message)
Sets the error message.
|
getBadgeDrawable, getSearchAffordanceColor, getSearchAffordanceColors, getTitle, getTitleView, getTitleViewAdapter, installTitleView, isShowingTitle, onDestroyView, onInflateTitleView, onPause, onResume, onSaveInstanceState, onViewCreated, setBadgeDrawable, setOnSearchClickedListener, setSearchAffordanceColor, setSearchAffordanceColors, setTitle, setTitleView, showTitle, showTitle
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onActivityCreated, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDetach, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onStop, onTrimMemory, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterSharedElementTransitionCallback, setEnterTransition, setExitSharedElementCallback, setExitSharedElementTransitionCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, toString, unregisterForContextMenu
public void setDefaultBackground(boolean translucent)
translucent
- True to set a translucent background.public boolean isBackgroundTranslucent()
public void setBackgroundDrawable(Drawable drawable)
drawable
- The drawable used for the background.public Drawable getBackgroundDrawable()
public void setImageDrawable(Drawable drawable)
drawable
- The drawable used for the error image.public Drawable getImageDrawable()
public void setMessage(CharSequence message)
message
- The error message.public CharSequence getMessage()
public void setButtonText(String text)
text
- The button text.public String getButtonText()
public void setButtonClickListener(View.OnClickListener clickListener)
clickListener
- The click listener for the button.public View.OnClickListener getButtonClickListener()
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Fragment
Fragment.onCreate(Bundle)
and Fragment.onActivityCreated(Bundle)
.
If you return a View from here, you will later be called in
Fragment.onDestroyView()
when the view is being released.
onCreateView
in class Fragment
inflater
- The LayoutInflater object that can be used to inflate
any views in the fragment,container
- If non-null, this is the parent view that the fragment's
UI should be attached to. The fragment should not add the view itself,
but this can be used to generate the LayoutParams of the view.savedInstanceState
- If non-null, this fragment is being re-constructed
from a previous saved state as given here.public void onStart()
Fragment
Activity.onStart
of the containing
Activity's lifecycle.onStart
in class BrandedFragment