📖 Pełna lista funkcji AndroidModule📖 Pełna lista funkcji AndroidModule
Tworzenie widokówCreating Views
getRootView()
createView(type, props)
addViewTo(parent, child, index?)
removeView(viewId)
removeAllViews(parentId)
Modyfikacja tekstuModyfikacja tekstu
setText(viewId, text)
getText(viewId)
setHint(viewId, hint)
appendText(viewId, text)
Modyfikacja wyglÄ…duModyfikacja wyglÄ…du
setBackgroundColor(viewId, color)
setTextColor(viewId, color)
setTextSize(viewId, sp)
setAlpha(viewId, alpha)
setPadding(viewId, dp)
setVisible(viewId, bool)
setEnabled(viewId, bool)
setGradient(viewId, c1, c2, dir)
setBorder(viewId, width, color, radius)
Rozmiar i pozycjaSize & Position
setSize(viewId, width, height)
setWidth(viewId, width)
setHeight(viewId, height)
setMargins(viewId, l, t, r, b)
measure(viewId)
EventyEventy
onClick(viewId, fn)
onLongClick(viewId, fn)
onTextChanged(viewId, fn)
onCheckedChanged(viewId, fn)
onFocusChange(viewId, fn)
onTouch(viewId, fn)
AnimacjeAnimations
animate(viewId, type, duration, callback?)
animateAlpha(viewId, from, to, duration, cb?)
animateScale(viewId, from, to, duration, cb?)
animateTranslateX/Y(viewId, from, to, dur, cb?)
animateRotation(viewId, from, to, duration, cb?)
animateBackgroundColor(viewId, from, to, dur)
animateMultiple(viewId, props, duration)
ConstraintLayoutConstraintLayout
constrainToParent(viewId, side, margin)
constrainCenter(viewId)
constrainCenterHorizontally/Vertically(viewId)
constrainBelow/Above(viewId, otherId, margin)
constrainStartToEnd/EndToStart(viewId, otherId, m)
createHorizontalChain(views, style)
createVerticalChain(views, style)
createGuideline(parentId, orientation, percent)
createBarrier(parentId, direction, views)
DialogiDialogs
toast(message, duration?)
snackbar(message, duration?, action?, callback?)
alert(title, message)
confirm(title, message, onOk, onCancel)
prompt(title, message, default, callback)
showOptions(title, options, callback)
SystemSystem
copyToClipboard(text)
getFromClipboard()
vibrate(ms)
openUrl(url)
openEmail(to, subject, body)
share(text)
showKeyboard(viewId)
hideKeyboard()
setPref(key, value)
getPref(key, default)
getScreenWidth/Height/Density()