OwnPostsAdapter

class OwnPostsAdapter(parentActivity: Activity) : RecyclerView.Adapter<OwnPostsViewHolder>

Adapter for the recycler view that handles the user's own posts.

Constructors

OwnPostsAdapter
Link copied to clipboard
fun OwnPostsAdapter(parentActivity: Activity)
Creates an adapter for the recycler view that handles the user's own posts.

Properties

context
Link copied to clipboard
private lateinit var context: Context
Context tied to the activity calling this adapter.
diffCallbacks
Link copied to clipboard
private val diffCallbacks: OwnPostsAdapter.<no name provided>
Callback that informs ArrayObjectAdapter how to compute list updates when using DiffUtil in ArrayObjectAdapter.
differ
Link copied to clipboard
private val differ: AsyncListDiffer<Post>
Helper for computing the difference between two lists via DiffUtil on a background thread.
firebaseHelper
Link copied to clipboard
private lateinit var firebaseHelper: FirebaseHelper
Wrapper over Firebase's realtime database.
parentActivity
Link copied to clipboard
private val parentActivity: Activity

Inherited properties

mHasStableIds
Link copied to clipboard
private val mHasStableIds: Boolean
mObservable
Link copied to clipboard
private val mObservable: RecyclerView.AdapterDataObservable
mStateRestorationPolicy
Link copied to clipboard

Functions

getItemCount
Link copied to clipboard
open override fun getItemCount(): Int
Returns the total number of items in the data set held by the adapter.
onBindViewHolder
Link copied to clipboard
open override fun onBindViewHolder(holder: OwnPostsViewHolder, position: Int)
Called by RecyclerView to display the data at the specified position.
open override fun onBindViewHolder(holder: OwnPostsViewHolder, position: Int, payloads: MutableList<Any>)
onCreateViewHolder
Link copied to clipboard
open override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): OwnPostsViewHolder
Called when RecyclerView needs a new RecyclerView.
updatePosts
Link copied to clipboard
fun updatePosts(newPosts: ArrayList<Post>)

Inherited functions

bindViewHolder
Link copied to clipboard
fun bindViewHolder(@NonNull() p0: OwnPostsViewHolder, p1: Int)
canRestoreState
Link copied to clipboard
open fun canRestoreState(): Boolean
createViewHolder
Link copied to clipboard
fun createViewHolder(@NonNull() p0: ViewGroup, p1: Int): OwnPostsViewHolder
findRelativeAdapterPositionIn
Link copied to clipboard
getItemId
Link copied to clipboard
open fun getItemId(p0: Int): Long
getItemViewType
Link copied to clipboard
open fun getItemViewType(p0: Int): Int
hasObservers
Link copied to clipboard
fun hasObservers(): Boolean
hasStableIds
Link copied to clipboard
fun hasStableIds(): Boolean
notifyDataSetChanged
Link copied to clipboard
fun notifyDataSetChanged()
notifyItemChanged
Link copied to clipboard
fun notifyItemChanged(p0: Int)
fun notifyItemChanged(p0: Int, @Nullable() p1: Any?)
notifyItemInserted
Link copied to clipboard
fun notifyItemInserted(p0: Int)
notifyItemMoved
Link copied to clipboard
fun notifyItemMoved(p0: Int, p1: Int)
notifyItemRangeChanged
Link copied to clipboard
fun notifyItemRangeChanged(p0: Int, p1: Int)
fun notifyItemRangeChanged(p0: Int, p1: Int, @Nullable() p2: Any?)
notifyItemRangeInserted
Link copied to clipboard
fun notifyItemRangeInserted(p0: Int, p1: Int)
notifyItemRangeRemoved
Link copied to clipboard
fun notifyItemRangeRemoved(p0: Int, p1: Int)
notifyItemRemoved
Link copied to clipboard
fun notifyItemRemoved(p0: Int)
onAttachedToRecyclerView
Link copied to clipboard
open fun onAttachedToRecyclerView(@NonNull() p0: RecyclerView)
onDetachedFromRecyclerView
Link copied to clipboard
open fun onDetachedFromRecyclerView(@NonNull() p0: RecyclerView)
onFailedToRecycleView
Link copied to clipboard
open fun onFailedToRecycleView(@NonNull() p0: OwnPostsViewHolder): Boolean
onViewAttachedToWindow
Link copied to clipboard
open fun onViewAttachedToWindow(@NonNull() p0: OwnPostsViewHolder)
onViewDetachedFromWindow
Link copied to clipboard
open fun onViewDetachedFromWindow(@NonNull() p0: OwnPostsViewHolder)
onViewRecycled
Link copied to clipboard
open fun onViewRecycled(@NonNull() p0: OwnPostsViewHolder)
registerAdapterDataObserver
Link copied to clipboard
open fun registerAdapterDataObserver(@NonNull() p0: RecyclerView.AdapterDataObserver)
setHasStableIds
Link copied to clipboard
open fun setHasStableIds(p0: Boolean)
setStateRestorationPolicy
Link copied to clipboard
unregisterAdapterDataObserver
Link copied to clipboard
open fun unregisterAdapterDataObserver(@NonNull() p0: RecyclerView.AdapterDataObserver)