📖 Pełna lista funkcji AndroidModule
Tworzenie widoków
getRootView()
createView(type, props)
addViewTo(parent, child, index?)
removeView(viewId)
removeAllViews(parentId)
Modyfikacja tekstu
setText(viewId, text)
getText(viewId)
setHint(viewId, hint)
appendText(viewId, text)
Modyfikacja 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 pozycja
setSize(viewId, width, height)
setWidth(viewId, width)
setHeight(viewId, height)
setMargins(viewId, l, t, r, b)
measure(viewId)
Eventy
onClick(viewId, fn)
onLongClick(viewId, fn)
onTextChanged(viewId, fn)
onCheckedChanged(viewId, fn)
onFocusChange(viewId, fn)
onTouch(viewId, fn)
Animacje
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)
ConstraintLayout
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)
Dialogi
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)
System
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()