public class ContentRecyclerAdapter extends de.mrapp.android.util.view.AbstractViewRecycler.Adapter<Tab,java.lang.Void> implements Restorable
TabSwitcher
, by encapsulating a TabSwitcherDecorator
.Constructor and Description |
---|
ContentRecyclerAdapter(TabSwitcher tabSwitcher,
TabSwitcherDecorator decorator)
Creates a new view recycler adapter, which allows to inflate views, which are associated with
the tabs of a
TabSwitcher , by encapsulating a TabSwitcherDecorator . |
Modifier and Type | Method and Description |
---|---|
int |
getViewType(Tab item) |
int |
getViewTypeCount() |
android.view.View |
onInflateView(android.view.LayoutInflater inflater,
android.view.ViewGroup parent,
Tab item,
int viewType,
java.lang.Void... params) |
void |
onRemoveView(android.view.View view,
Tab item) |
void |
onShowView(android.content.Context context,
android.view.View view,
Tab item,
boolean inflated,
java.lang.Void... params) |
void |
restoreInstanceState(android.os.Bundle savedInstanceState)
Restores a previously saved state.
|
void |
saveInstanceState(android.os.Bundle outState)
Saves the current state.
|
public ContentRecyclerAdapter(@NonNull TabSwitcher tabSwitcher, @NonNull TabSwitcherDecorator decorator)
TabSwitcher
, by encapsulating a TabSwitcherDecorator
.tabSwitcher
- The tab switcher, which contains the tabs, whose associated views are inflated by the
adapter, correspond to, as an instance of the class TabSwitcher
. The tab
switcher may not be nulldecorator
- The decorator, which should be used to inflate the associated views, as an instance
of the class TabSwitcherDecorator
. The decorator may not be null@NonNull public final android.view.View onInflateView(@NonNull android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup parent, @NonNull Tab item, int viewType, @NonNull java.lang.Void... params)
onInflateView
in class de.mrapp.android.util.view.AbstractViewRecycler.Adapter<Tab,java.lang.Void>
public final void onShowView(@NonNull android.content.Context context, @NonNull android.view.View view, @NonNull Tab item, boolean inflated, @NonNull java.lang.Void... params)
onShowView
in class de.mrapp.android.util.view.AbstractViewRecycler.Adapter<Tab,java.lang.Void>
public final void onRemoveView(@NonNull android.view.View view, @NonNull Tab item)
onRemoveView
in class de.mrapp.android.util.view.AbstractViewRecycler.Adapter<Tab,java.lang.Void>
public final int getViewTypeCount()
getViewTypeCount
in class de.mrapp.android.util.view.AbstractViewRecycler.Adapter<Tab,java.lang.Void>
public final int getViewType(@NonNull Tab item)
getViewType
in class de.mrapp.android.util.view.AbstractViewRecycler.Adapter<Tab,java.lang.Void>
public final void saveInstanceState(@NonNull android.os.Bundle outState)
Restorable
saveInstanceState
in interface Restorable
outState
- The bundle, which should be used to store the saved state, as an instance of the
class Bundle
. The bundle may not be nullpublic final void restoreInstanceState(@Nullable android.os.Bundle savedInstanceState)
Restorable
restoreInstanceState
in interface Restorable
savedInstanceState
- The saved state as an instance of the class Bundle
or null, if no saved state
is available