UserAvatarView

Represents the User avatar that's shown on the Messages screen or in headers of DMs.

Based on the state within the User, we either show an image or their initials.

Constructors

Link copied to clipboard
constructor(context: Context)
constructor(context: Context, attrs: AttributeSet?)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int)
constructor(context: Context, avatarStyle: AvatarStyle)

Inherited properties

Link copied to clipboard

Ensures the context being accessed in a View can be cast to Activity.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun setOnline(online: Boolean)

Sets the online status for the user.

Link copied to clipboard
fun setUser(user: User, online: Boolean = user.online)

Sets the User we want to show the avatar for.

Inherited functions

Link copied to clipboard
Link copied to clipboard
open fun addFocusables(p0: ArrayList<View>, p1: Int)
open fun addFocusables(p0: ArrayList<View>, p1: Int, p2: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun animateTransform(p0: Matrix?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun bringToFront()
Link copied to clipboard
Link copied to clipboard
open fun buildLayer()
Link copied to clipboard
open fun callOnClick(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun cancelLongPress()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun clearAnimation()
Link copied to clipboard
Link copied to clipboard
open fun clearFocus()
Link copied to clipboard
Link copied to clipboard
open fun computeScroll()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun dispatchDisplayHint(p0: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun dispatchNestedFling(p0: Float, p1: Float, p2: Boolean): Boolean
Link copied to clipboard
Link copied to clipboard
open fun dispatchNestedPreScroll(p0: Int, p1: Int, p2: IntArray?, p3: IntArray?): Boolean
Link copied to clipboard
open fun dispatchNestedScroll(p0: Int, p1: Int, p2: Int, p3: Int, p4: IntArray?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun draw(p0: Canvas)
Link copied to clipboard
open override fun drawableHotspotChanged(p0: Float, p1: Float)
Link copied to clipboard
open fun findFocus(): View
Link copied to clipboard
fun <T : View> findViewById(p0: Int): T
Link copied to clipboard
Link copied to clipboard
fun <T : View> findViewWithTag(p0: Any): T
Link copied to clipboard
open fun focusSearch(p0: Int): View
Link copied to clipboard
Link copied to clipboard
open fun forceLayout()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getAlpha(): Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getAutofillType(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getBaseline(): Int
Link copied to clipboard
Link copied to clipboard
fun getBottom(): Int
Link copied to clipboard
Link copied to clipboard
open fun getClipBounds(): Rect
open fun getClipBounds(p0: Rect): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getDisplay(): Display
Link copied to clipboard
open fun getDrawable(): Drawable
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getDrawingRect(p0: Rect)
Link copied to clipboard
open fun getDrawingTime(): Long
Link copied to clipboard
open fun getElevation(): Float
Link copied to clipboard
open fun getExplicitStyle(): Int
Link copied to clipboard
Link copied to clipboard
open fun getFocusable(): Int
Link copied to clipboard
Link copied to clipboard
open fun getFocusedRect(p0: Rect)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getHandler(): Handler
Link copied to clipboard
fun getHeight(): Int
Link copied to clipboard
open fun getHitRect(p0: Rect)
Link copied to clipboard
Link copied to clipboard
open fun getId(): Int
Link copied to clipboard
open fun getImageAlpha(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getLabelFor(): Int
Link copied to clipboard
open fun getLayerType(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getLeft(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getMatrix(): Matrix
Link copied to clipboard
open fun getMaxHeight(): Int
Link copied to clipboard
open fun getMaxWidth(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getMinimumHeight(): Int
Link copied to clipboard
open fun getMinimumWidth(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getNextFocusUpId(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getPaddingBottom(): Int
Link copied to clipboard
open override fun getPaddingEnd(): Int
Link copied to clipboard
open override fun getPaddingLeft(): Int
Link copied to clipboard
open override fun getPaddingRight(): Int
Link copied to clipboard
open override fun getPaddingStart(): Int
Link copied to clipboard
open override fun getPaddingTop(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getPivotX(): Float
Link copied to clipboard
open fun getPivotY(): Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getRight(): Int
Link copied to clipboard
open fun getRootView(): View
Link copied to clipboard
Link copied to clipboard
open fun getRotation(): Float
Link copied to clipboard
open fun getRotationX(): Float
Link copied to clipboard
open fun getRotationY(): Float
Link copied to clipboard
Link copied to clipboard
open fun getScaleX(): Float
Link copied to clipboard
open fun getScaleY(): Float
Link copied to clipboard
Link copied to clipboard
open fun getScrollBarSize(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getShapeAppearanceModel(): ShapeAppearanceModel
Link copied to clipboard
open fun getSolidColor(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getTag(): Any
open fun getTag(p0: Int): Any
Link copied to clipboard
open fun getTextAlignment(): Int
Link copied to clipboard
open fun getTextDirection(): Int
Link copied to clipboard
Link copied to clipboard
fun getTop(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getVisibility(): Int
Link copied to clipboard
fun getWidth(): Int
Link copied to clipboard
open fun getWindowId(): WindowId
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getX(): Float
Link copied to clipboard
open fun getY(): Float
Link copied to clipboard
open fun getZ(): Float
Link copied to clipboard
Link copied to clipboard
open fun hasFocus(): Boolean
Link copied to clipboard
open fun hasFocusable(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun hasOverlappingRendering(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun invalidate()
open fun invalidate(p0: Rect)
open fun invalidate(p0: Int, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
open override fun invalidateDrawable(p0: Drawable)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isActivated(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isClickable(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isCredential(): Boolean
Link copied to clipboard
open fun isDirty(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isEnabled(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isFocused(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isHovered(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isInEditMode(): Boolean
Link copied to clipboard
open fun isInLayout(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isLaidOut(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun isOpaque(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isPivotSet(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isPressed(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isSelected(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isShown(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun jumpDrawablesToCurrentState()
Link copied to clipboard
Link copied to clipboard
open fun layout(p0: Int, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
fun ImageView.load(data: Any?, placeholderDrawable: Drawable?, transformation: StreamImageLoader.ImageTransformation = ImageTransformation.None, onStart: () -> Unit = {}, onComplete: () -> Unit = {}): Disposable
fun ImageView.load(data: Any?, @DrawableRes placeholderResId: Int? = null, transformation: StreamImageLoader.ImageTransformation = ImageTransformation.None, onStart: () -> Unit = {}, onComplete: () -> Unit = {}): Disposable
Link copied to clipboard
suspend fun ImageView.loadAndResize(data: Any?, placeholderDrawable: Drawable?, transformation: StreamImageLoader.ImageTransformation = ImageTransformation.None, onStart: () -> Unit = {}, onComplete: () -> Unit = {})

Loads an image into a drawable and then applies the drawable to the container, resizing it based on the scale types and the given configuration.

Link copied to clipboard
fun ImageView.loadVideoThumbnail(uri: Uri?, @DrawableRes placeholderResId: Int? = null, transformation: StreamImageLoader.ImageTransformation = ImageTransformation.None, onStart: () -> Unit = {}, onComplete: () -> Unit = {}): Disposable
Link copied to clipboard
fun measure(p0: Int, p1: Int)
Link copied to clipboard
open fun offsetLeftAndRight(p0: Int)
Link copied to clipboard
open fun offsetTopAndBottom(p0: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onCreateDrawableState(p0: Int): IntArray
Link copied to clipboard
Link copied to clipboard
open fun onDrawForeground(p0: Canvas)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onHoverChanged(p0: Boolean)
Link copied to clipboard
Link copied to clipboard
open override fun onKeyDown(p0: Int, p1: KeyEvent): Boolean
Link copied to clipboard
open override fun onKeyLongPress(p0: Int, p1: KeyEvent): Boolean
Link copied to clipboard
open override fun onKeyMultiple(p0: Int, p1: Int, p2: KeyEvent): Boolean
Link copied to clipboard
open fun onKeyPreIme(p0: Int, p1: KeyEvent): Boolean
Link copied to clipboard
open fun onKeyShortcut(p0: Int, p1: KeyEvent): Boolean
Link copied to clipboard
open override fun onKeyUp(p0: Int, p1: KeyEvent): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onRtlPropertiesChanged(p0: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onVisibilityAggregated(p0: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun performClick(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun playSoundEffect(p0: Int)
Link copied to clipboard
open fun post(p0: Runnable): Boolean
Link copied to clipboard
open fun postDelayed(p0: Runnable, p1: Long): Boolean
Link copied to clipboard
open fun postInvalidate()
open fun postInvalidate(p0: Int, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
open fun postInvalidateDelayed(p0: Long, p1: Int, p2: Int, p3: Int, p4: Int)
Link copied to clipboard
open fun postInvalidateOnAnimation(p0: Int, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun requestLayout()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T : View> requireViewById(p0: Int): T & Any
Link copied to clipboard
open fun resetPivot()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun scheduleDrawable(p0: Drawable, p1: Runnable, p2: Long)
Link copied to clipboard
open fun scrollBy(p0: Int, p1: Int)
Link copied to clipboard
open fun scrollTo(p0: Int, p1: Int)
Link copied to clipboard
open override fun sendAccessibilityEvent(p0: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setActivated(p0: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setAlpha(p0: Float)
open fun setAlpha(p0: Int)
Link copied to clipboard
open fun setAnimation(p0: Animation)
Link copied to clipboard
open fun setAnimationMatrix(p0: Matrix?)
Link copied to clipboard
open fun setAutofillHints(vararg p0: String)
Link copied to clipboard
open fun setAutofillId(p0: AutofillId?)
Link copied to clipboard
Link copied to clipboard
fun setAvatar(avatar: Any?, placeholder: Any? = null)

Sets an avatar to display in this image view.

Link copied to clipboard
open fun setBackground(p0: Drawable)
Link copied to clipboard
open fun setBackgroundColor(p0: Int)
Link copied to clipboard
open override fun setBackgroundDrawable(@Nullable p0: Drawable?)
Link copied to clipboard
open override fun setBackgroundResource(@DrawableRes p0: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setBaseline(p0: Int)
Link copied to clipboard
Link copied to clipboard
fun setBottom(p0: Int)
Link copied to clipboard
open fun setCameraDistance(p0: Float)
Link copied to clipboard
open fun setClickable(p0: Boolean)
Link copied to clipboard
open fun setClipBounds(p0: Rect)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setContentPadding(@Dimension p0: Int, @Dimension p1: Int, @Dimension p2: Int, @Dimension p3: Int)
Link copied to clipboard
@RequiresApi(value = 17)
open fun setContentPaddingRelative(@Dimension p0: Int, @Dimension p1: Int, @Dimension p2: Int, @Dimension p3: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setElevation(p0: Float)
Link copied to clipboard
open fun setEnabled(p0: Boolean)
Link copied to clipboard
open fun setFadingEdgeLength(p0: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setFocusable(p0: Boolean)
open fun setFocusable(p0: Int)
Link copied to clipboard