PercentageCropImageView

A custom AppCompatImageView that allows precise control over the visible crop area of an image by adjusting its horizontal and vertical center offset percentages.

Key Features:

  • Allows manual vertical or horizontal cropping via percentage offsets.

  • Works seamlessly with Coil, Glide, or any image loading library.

Usage (XML):

You can set the crop offset directly in XML using custom attributes:

<com.lagradost.cloudstream3.utils.PercentageCropImageView
android:id="@+id/home_scroll_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="matrix"
app:cropYCenterOffsetPct="0.2"
app:cropXCenterOffsetPct="0.5"
tools:src="@drawable/example_poster" />
  • app:cropYCenterOffsetPct → controls how far vertically the image shifts 0.0 = top-aligned, 0.5 = centered, 1.0 = bottom-aligned.

  • app:cropXCenterOffsetPct → controls how far horizontally the image shifts 0.0 = left, 0.5 = center, 1.0 = right.

Programmatic Example:

imageView.cropYCenterOffsetPct = 0.15f   // Show slightly more (15%) of the top area
imageView.cropXCenterOffsetPct = 0.5f // Keep image centered horizontally
imageView.redraw() //Only needed if you changed cropYCenterOffsetPct/cropXCenterOffsetPct at runtime

Notes:

  • Must use android:scaleType="matrix" to enable manual matrix transformations.

  • Reference: https://stackoverflow.com/a/29055283

See also

ImageView.ScaleType.MATRIX

Constructors

Link copied to clipboard
constructor(context: Context?)
constructor(context: Context?, attrs: AttributeSet?)
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int)

Properties

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 var alpha: Float
Link copied to clipboard
open var animation: Animation?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val autofillHints: Array<out String?>??
Link copied to clipboard
Link copied to clipboard
open val autofillType: Int
Link copied to clipboard
Link copied to clipboard
open var background: Drawable?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var baseline: Int
Link copied to clipboard
Link copied to clipboard
var bottom: Int
Link copied to clipboard
protected open val bottomFadingEdgeStrength: Float
Link copied to clipboard
protected open val bottomPaddingOffset: Int
Link copied to clipboard
Link copied to clipboard
open var clipBounds: 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
Link copied to clipboard

the horizontal crop percentage (0.0–1.0)

Link copied to clipboard

the vertical crop percentage (0.0–1.0)

Link copied to clipboard
open val display: Display?
Link copied to clipboard
open val drawable: Drawable?
Link copied to clipboard
Link copied to clipboard
open val drawingCache: Bitmap?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val drawingTime: Long
Link copied to clipboard
open var elevation: Float
Link copied to clipboard
open val explicitStyle: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var focusable: Int
Link copied to clipboard
open var foreground: Drawable?
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 val handler: Handler?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val height: Int
Link copied to clipboard
Link copied to clipboard
protected open val horizontalScrollbarHeight: Int
Link copied to clipboard
open var id: Int
Link copied to clipboard
open var imageAlpha: Int
Link copied to clipboard
open var imageMatrix: Matrix?
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isDirty: Boolean
Link copied to clipboard
Link copied to clipboard
open var isEnabled: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val 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 var isHovered: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isLaidOut: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isOpaque: Boolean
Link copied to clipboard
protected open val isPaddingOffsetRequired: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var 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
Link copied to clipboard
Link copied to clipboard
open val 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
open var labelFor: Int
Link copied to clipboard
open val layerType: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var left: Int
Link copied to clipboard
protected open val leftFadingEdgeStrength: Float
Link copied to clipboard
protected open val leftPaddingOffset: Int
Link copied to clipboard
open val matrix: Matrix?
Link copied to clipboard
open var maxHeight: Int
Link copied to clipboard
open var maxWidth: 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 var minimumHeight: Int
Link copied to clipboard
open var minimumWidth: 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 var nextFocusUpId: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val overlay: ViewOverlay?
Link copied to clipboard
Link copied to clipboard
open val paddingBottom: Int
Link copied to clipboard
open val paddingEnd: Int
Link copied to clipboard
open val paddingLeft: Int
Link copied to clipboard
open val paddingRight: Int
Link copied to clipboard
open val paddingStart: Int
Link copied to clipboard
open val paddingTop: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var pivotX: Float
Link copied to clipboard
open var pivotY: Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val resources: Resources?
Link copied to clipboard
Link copied to clipboard
var right: Int
Link copied to clipboard
protected open val rightFadingEdgeStrength: Float
Link copied to clipboard
protected open val rightPaddingOffset: Int
Link copied to clipboard
Link copied to clipboard
open val rootView: View?
Link copied to clipboard
Link copied to clipboard
open var rotation: Float
Link copied to clipboard
open var rotationX: Float
Link copied to clipboard
open var rotationY: Float
Link copied to clipboard
Link copied to clipboard
open var scaleX: Float
Link copied to clipboard
open var scaleY: Float
Link copied to clipboard
Link copied to clipboard
open var scrollBarSize: 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 val solidColor: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open val suggestedMinimumHeight: Int
Link copied to clipboard
protected open val suggestedMinimumWidth: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var tag: Any?
Link copied to clipboard
open var textAlignment: Int
Link copied to clipboard
open var textDirection: Int
Link copied to clipboard
Link copied to clipboard
var top: Int
Link copied to clipboard
protected open val topFadingEdgeStrength: Float
Link copied to clipboard
protected open val topPaddingOffset: 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 var visibility: Int
Link copied to clipboard
val width: Int
Link copied to clipboard
protected open val windowAttachCount: Int
Link copied to clipboard
open val windowId: WindowId?
Link copied to clipboard
Link copied to clipboard
open val windowToken: IBinder?
Link copied to clipboard
Link copied to clipboard
open var x: Float
Link copied to clipboard
open var y: Float
Link copied to clipboard
open var z: Float

Functions

Link copied to clipboard
open fun addChildrenForAccessibility(outChildren: ArrayList<View?>?)
Link copied to clipboard
open fun addExtraDataToAccessibilityNodeInfo(info: AccessibilityNodeInfo, extraDataKey: String, arguments: Bundle?)
Link copied to clipboard
open fun addFocusables(views: ArrayList<View?>?, direction: Int)
open fun addFocusables(views: ArrayList<View?>?, direction: Int, focusableMode: Int)
Link copied to clipboard
open fun addKeyboardNavigationClusters(views: Collection<View?>, direction: Int)
Link copied to clipboard
open fun addTouchables(views: ArrayList<View?>?)
Link copied to clipboard
Link copied to clipboard
open fun animateTransform(matrix: Matrix?)
Link copied to clipboard
Link copied to clipboard
open fun autofill(values: SparseArray<AutofillValue?>)
open fun autofill(value: AutofillValue?)
Link copied to clipboard
protected open fun awakenScrollBars(): Boolean
protected open fun awakenScrollBars(startDelay: Int): Boolean
protected open fun awakenScrollBars(startDelay: Int, invalidate: Boolean): Boolean
Link copied to clipboard
open fun bringToFront()
Link copied to clipboard
open fun buildDrawingCache(autoScale: Boolean)
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
open fun canScrollHorizontally(direction: Int): Boolean
Link copied to clipboard
open fun canScrollVertically(direction: Int): Boolean
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
Link copied to clipboard
protected open fun computeHorizontalScrollExtent(): Int
Link copied to clipboard
protected open fun computeHorizontalScrollOffset(): Int
Link copied to clipboard
protected open fun computeHorizontalScrollRange(): Int
Link copied to clipboard
open fun computeScroll()
Link copied to clipboard
open fun computeSystemWindowInsets(in: WindowInsets?, outLocalInsets: Rect?): WindowInsets?
Link copied to clipboard
protected open fun computeVerticalScrollExtent(): Int
Link copied to clipboard
protected open fun computeVerticalScrollOffset(): Int
Link copied to clipboard
protected open fun computeVerticalScrollRange(): 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 dispatchDisplayHint(hint: Int)
Link copied to clipboard
Link copied to clipboard
protected open fun dispatchDraw(canvas: Canvas)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open fun dispatchGenericFocusedEvent(event: MotionEvent?): Boolean
Link copied to clipboard
Link copied to clipboard
protected open fun dispatchGenericPointerEvent(event: MotionEvent?): Boolean
Link copied to clipboard
protected open fun dispatchHoverEvent(event: MotionEvent?): Boolean
Link copied to clipboard
open fun dispatchKeyEvent(event: KeyEvent?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun dispatchNestedFling(velocityX: Float, velocityY: Float, consumed: Boolean): Boolean
Link copied to clipboard
open fun dispatchNestedPreFling(velocityX: Float, velocityY: Float): Boolean
Link copied to clipboard
open fun dispatchNestedPreScroll(dx: Int, dy: Int, consumed: IntArray?, offsetInWindow: IntArray?): Boolean
Link copied to clipboard
open fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, offsetInWindow: IntArray?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open fun dispatchRestoreInstanceState(container: SparseArray<Parcelable?>?)
Link copied to clipboard
protected open fun dispatchSaveInstanceState(container: SparseArray<Parcelable?>?)
Link copied to clipboard
open fun dispatchScrollCaptureSearch(localVisibleRect: Rect, windowOffset: Point, targets: Consumer<ScrollCaptureTarget?>)
Link copied to clipboard
protected open fun dispatchSetActivated(activated: Boolean)
Link copied to clipboard
protected open fun dispatchSetPressed(pressed: Boolean)
Link copied to clipboard
protected open fun dispatchSetSelected(selected: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun dispatchUnhandledMove(focused: View?, direction: Int): Boolean
Link copied to clipboard
protected open fun dispatchVisibilityChanged(changedView: View, visibility: Int)
Link copied to clipboard
Link copied to clipboard
open fun dispatchWindowVisibilityChanged(visibility: Int)
Link copied to clipboard
open fun draw(canvas: Canvas)
Link copied to clipboard
Link copied to clipboard
protected open fun drawableStateChanged()
Link copied to clipboard
open fun findFocus(): View?
Link copied to clipboard
fun <T : View?> findViewById(id: Int): T?
Link copied to clipboard
open fun findViewsWithText(outViews: ArrayList<View?>?, searched: CharSequence?, flags: Int)
Link copied to clipboard
fun <T : View?> findViewWithTag(tag: Any?): T?
Link copied to clipboard
protected open fun fitSystemWindows(insets: Rect?): Boolean
Link copied to clipboard
open fun focusSearch(direction: Int): View?
Link copied to clipboard
open fun forceHasOverlappingRendering(hasOverlappingRendering: Boolean)
Link copied to clipboard
open fun forceLayout()
Link copied to clipboard
Link copied to clipboard
open fun generateDisplayHash(hashAlgorithm: String, bounds: Rect?, executor: Executor, callback: DisplayHashResultCallback)
Link copied to clipboard
Link copied to clipboard
open fun getDrawingRect(outRect: Rect?)
Link copied to clipboard
open fun getFocusables(direction: Int): ArrayList<View?>?
Link copied to clipboard
open fun getFocusedRect(r: Rect?)
Link copied to clipboard
open fun getGlobalVisibleRect(r: Rect?, globalOffset: Point?): Boolean
Link copied to clipboard
open fun getHitRect(outRect: Rect?)
Link copied to clipboard
Link copied to clipboard
open fun getLocationInSurface(location: IntArray)
Link copied to clipboard
open fun getLocationInWindow(outLocation: IntArray?)
Link copied to clipboard
open fun getLocationOnScreen(outLocation: IntArray?)
Link copied to clipboard
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun invalidate()
open fun invalidate(dirty: Rect?)
open fun invalidate(l: Int, t: Int, r: Int, b: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isVisibleToUserForAutofill(virtualId: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open fun keyboardNavigationClusterSearch(currentCluster: View?, direction: Int): View?
Link copied to clipboard
open fun layout(l: Int, t: Int, r: Int, b: Int)
Link copied to clipboard
fun ImageView.loadImage(imageData: Bitmap?, builder: ImageRequest.Builder.() -> Unit = {})
fun ImageView.loadImage(imageData: Drawable?, builder: ImageRequest.Builder.() -> Unit = {})
fun ImageView.loadImage(imageData: File?, builder: ImageRequest.Builder.() -> Unit = {})
fun ImageView.loadImage(imageData: ByteBuffer?, builder: ImageRequest.Builder.() -> Unit = {})
fun ImageView.loadImage(imageData: ByteArray?, builder: ImageRequest.Builder.() -> Unit = {})
fun ImageView.loadImage(@DrawableRes imageData: Int?, builder: ImageRequest.Builder.() -> Unit = {})
fun ImageView.loadImage(imageData: Uri?, headers: Map<String, String>? = null, builder: ImageRequest.Builder.() -> Unit = {})
fun ImageView.loadImage(imageData: String?, headers: Map<String, String>? = null, builder: ImageRequest.Builder.() -> Unit = {})
fun ImageView.loadImage(imageData: HttpUrl?, headers: Map<String, String>? = null, builder: ImageRequest.Builder.() -> Unit = {})

fun ImageView.loadImage(imageData: UiImage?, builder: ImageRequest.Builder.() -> Unit = {})

TYPE_SAFE_LOADERS

Link copied to clipboard
fun measure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Link copied to clipboard
open fun offsetLeftAndRight(offset: Int)
Link copied to clipboard
open fun offsetTopAndBottom(offset: Int)
Link copied to clipboard
protected open fun onAnimationEnd()
Link copied to clipboard
protected open fun onAnimationStart()
Link copied to clipboard
Link copied to clipboard
protected open fun onAttachedToWindow()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open fun onConfigurationChanged(newConfig: Configuration?)
Link copied to clipboard
protected open fun onCreateContextMenu(menu: ContextMenu?)
Link copied to clipboard
open fun onCreateDrawableState(extraSpace: Int): IntArray?
Link copied to clipboard
Link copied to clipboard
open fun onCreateViewTranslationRequest(supportedFormats: IntArray, requestsCollector: Consumer<ViewTranslationRequest?>)
Link copied to clipboard
open fun onCreateVirtualViewTranslationRequests(virtualIds: LongArray, supportedFormats: IntArray, requestsCollector: Consumer<ViewTranslationRequest?>)
Link copied to clipboard
protected open fun onDetachedFromWindow()
Link copied to clipboard
protected open fun onDisplayHint(hint: Int)
Link copied to clipboard
open fun onDragEvent(event: DragEvent?): Boolean
Link copied to clipboard
protected open fun onDraw(canvas: Canvas)
Link copied to clipboard
open fun onDrawForeground(canvas: Canvas)
Link copied to clipboard
protected fun onDrawScrollBars(canvas: Canvas)
Link copied to clipboard
protected open fun onFinishInflate()
Link copied to clipboard
Link copied to clipboard
protected open fun onFocusChanged(gainFocus: Boolean, direction: Int, previouslyFocusedRect: Rect?)
Link copied to clipboard
Link copied to clipboard
open fun onHoverChanged(hovered: Boolean)
Link copied to clipboard
open fun onHoverEvent(event: MotionEvent?): Boolean
Link copied to clipboard
open fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyLongPress(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyMultiple(keyCode: Int, repeatCount: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyPreIme(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyShortcut(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
protected open fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
protected open fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Link copied to clipboard
protected open fun onOverScrolled(scrollX: Int, scrollY: Int, clampedX: Boolean, clampedY: Boolean)
Link copied to clipboard
open fun onPointerCaptureChange(hasCapture: Boolean)
Link copied to clipboard
open fun onProvideAutofillStructure(structure: ViewStructure?, flags: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onProvideStructure(structure: ViewStructure?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onResolvePointerIcon(event: MotionEvent?, pointerIndex: Int): PointerIcon?
Link copied to clipboard
protected open fun onRestoreInstanceState(state: Parcelable?)
Link copied to clipboard
open fun onRtlPropertiesChanged(layoutDirection: Int)
Link copied to clipboard
protected open fun onSaveInstanceState(): Parcelable?
Link copied to clipboard
open fun onScreenStateChanged(screenState: Int)
Link copied to clipboard
open fun onScrollCaptureSearch(localVisibleRect: Rect, windowOffset: Point, targets: Consumer<ScrollCaptureTarget?>)
Link copied to clipboard
protected open fun onScrollChanged(l: Int, t: Int, oldl: Int, oldt: Int)
Link copied to clipboard
protected open fun onSetAlpha(alpha: Int): Boolean
Link copied to clipboard
protected open fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int)
Link copied to clipboard
Link copied to clipboard
open fun onTouchEvent(event: MotionEvent?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onVisibilityAggregated(isVisible: Boolean)
Link copied to clipboard
protected open fun onVisibilityChanged(changedView: View, visibility: Int)
Link copied to clipboard
open fun onWindowFocusChanged(hasWindowFocus: Boolean)
Link copied to clipboard
Link copied to clipboard
protected open fun onWindowVisibilityChanged(visibility: Int)
Link copied to clipboard
protected open fun overScrollBy(deltaX: Int, deltaY: Int, scrollX: Int, scrollY: Int, scrollRangeX: Int, scrollRangeY: Int, maxOverScrollX: Int, maxOverScrollY: Int, isTouchEvent: Boolean): Boolean
Link copied to clipboard
open fun performAccessibilityAction(action: Int, arguments: Bundle?): Boolean
Link copied to clipboard
open fun performClick(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun performHapticFeedback(feedbackConstant: Int): Boolean
open fun performHapticFeedback(feedbackConstant: Int, flags: Int): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun playSoundEffect(soundConstant: Int)
Link copied to clipboard
fun View.popupMenuNoIcons(items: List<Pair<Int, Int>>, onMenuItemClick: MenuItem.() -> Unit): PopupMenu

id, stringRes

Link copied to clipboard
fun View.popupMenuNoIconsAndNoStringRes(items: List<Pair<Int, String>>, onMenuItemClick: MenuItem.() -> Unit): PopupMenu

id, string

Link copied to clipboard
open fun post(action: Runnable?): Boolean
Link copied to clipboard
open fun postDelayed(action: Runnable?, delayMillis: Long): Boolean
Link copied to clipboard
open fun postInvalidate()
open fun postInvalidate(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun postInvalidateDelayed(delayMilliseconds: Long)
open fun postInvalidateDelayed(delayMilliseconds: Long, left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun postInvalidateOnAnimation(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun postOnAnimation(action: Runnable?)
Link copied to clipboard
open fun postOnAnimationDelayed(action: Runnable?, delayMillis: Long)
Link copied to clipboard
fun redraw()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun removeCallbacks(action: Runnable?): Boolean
Link copied to clipboard
open fun reportAppJankStats(appJankStats: AppJankStats)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun requestFocus(direction: Int): Boolean
open fun requestFocus(direction: Int, previouslyFocusedRect: Rect?): Boolean
Link copied to clipboard
Link copied to clipboard
open fun requestLayout()
Link copied to clipboard
Link copied to clipboard
open fun requestRectangleOnScreen(rectangle: Rect?): Boolean
open fun requestRectangleOnScreen(rectangle: Rect?, immediate: Boolean): Boolean
Link copied to clipboard
fun <T : View?> requireViewById(id: Int): T & Any
Link copied to clipboard
open fun resetPivot()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun saveAttributeDataForStyleable(context: Context, styleable: IntArray, attrs: AttributeSet?, t: TypedArray, defStyleAttr: Int, defStyleRes: Int)
Link copied to clipboard
open fun saveHierarchyState(container: SparseArray<Parcelable?>?)
Link copied to clipboard
open fun scheduleDrawable(who: Drawable, what: Runnable, when: Long)
Link copied to clipboard
open fun scrollBy(x: Int, y: Int)
Link copied to clipboard
open fun scrollTo(x: Int, y: Int)
Link copied to clipboard
open fun sendAccessibilityEvent(eventType: Int)
Link copied to clipboard
open fun setAccessibilityDataSensitive(accessibilityDataSensitive: Int)
Link copied to clipboard
open fun setAllowClickWhenDisabled(clickableWhenDisabled: Boolean)
Link copied to clipboard
open fun setAllowedHandwritingDelegatePackage(allowedPackageName: String?)
Link copied to clipboard
open fun setAllowedHandwritingDelegatorPackage(allowedPackageName: String?)
Link copied to clipboard
open fun setAlpha(alpha: Int)
Link copied to clipboard
open fun setAutofillHints(vararg autofillHints: String?)
Link copied to clipboard
open fun setBackgroundColor(color: Int)
Link copied to clipboard
open fun setBackgroundDrawable(@Nullable background: Drawable?)
Link copied to clipboard
Link copied to clipboard
open fun setFadingEdgeLength(length: Int)
Link copied to clipboard
protected open override fun setFrame(l: Int, t: Int, r: Int, b: Int): Boolean
Link copied to clipboard
open fun setHandwritingBoundsOffsets(offsetLeft: Float, offsetTop: Float, offsetRight: Float, offsetBottom: Float)
Link copied to clipboard
open fun setHasTransientState(hasTransientState: Boolean)
Link copied to clipboard
open fun setImageBitmap(bm: Bitmap?)
Link copied to clipboard
open override fun setImageDrawable(d: Drawable?)
Link copied to clipboard
open fun setImageIcon(icon: Icon?)
Link copied to clipboard
open fun setImageLevel(level: Int)
Link copied to clipboard
open override fun setImageResource(resId: Int)
Link copied to clipboard
open fun setImageState(state: IntArray?, merge: Boolean)
Link copied to clipboard
open fun setImageURI(@Nullable uri: Uri?)
Link copied to clipboard
open fun setIsCredential(isCredential: Boolean)
Link copied to clipboard
open fun setIsHandwritingDelegate(isHandwritingDelegate: Boolean)
Link copied to clipboard
open fun setLayerPaint(paint: Paint?)
Link copied to clipboard
open fun setLayerType(layerType: Int, paint: Paint?)
Link copied to clipboard
fun setLeftTopRightBottom(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
protected fun setMeasuredDimension(measuredWidth: Int, measuredHeight: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setOnReceiveContentListener(mimeTypes: Array<out String?>??, listener: OnReceiveContentListener?)
Link copied to clipboard
Link copied to clipboard
open fun setPadding(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun setPaddingRelative(start: Int, top: Int, end: Int, bottom: Int)
Link copied to clipboard
open fun setRenderEffect(renderEffect: RenderEffect?)
Link copied to clipboard
open fun setTransitionVisibility(visibility: Int)
Link copied to clipboard
open fun setWillNotCacheDrawing(willNotCacheDrawing: Boolean)
Link copied to clipboard
open fun setWillNotDraw(willNotDraw: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun startAnimation(animation: Animation?)
Link copied to clipboard
fun startDrag(data: ClipData?, shadowBuilder: View.DragShadowBuilder?, myLocalState: Any?, flags: Int): Boolean
Link copied to clipboard
fun startDragAndDrop(data: ClipData?, shadowBuilder: View.DragShadowBuilder?, myLocalState: Any?, flags: Int): Boolean
Link copied to clipboard
open fun startNestedScroll(axes: Int): Boolean
Link copied to clipboard
open fun stopNestedScroll()
Link copied to clipboard
Link copied to clipboard
open fun transformMatrixToLocal(matrix: Matrix)
Link copied to clipboard
open fun unscheduleDrawable(who: Drawable, what: Runnable)
Link copied to clipboard
Link copied to clipboard
protected open fun verifyDrawable(dr: Drawable): Boolean
Link copied to clipboard
Link copied to clipboard
open fun willNotDraw(): Boolean