public class MobileUILayout
extends org.remoteui.client.ios.view.adapter.AbstractViewAdapter
implements io.nevernull.mobileui.core.ResourceUpdateListener, io.nevernull.mobileui.core.PropertyFireListener
UIViewController
.
To use a MobileUI layout in your UIViewController
, create it within the
loadView()
method like this:
@Override public void loadView() { setView(new MobileUILayout("Main.layout.xml", this)); }
The second parameter is the binding context for the UI data bindings.
org.robovm.apple.uikit.UIView.UIViewPtr
org.robovm.apple.uikit.UIResponder.UIResponderPtr
org.robovm.apple.foundation.NSObject.Marshaler, org.robovm.apple.foundation.NSObject.NoRetainMarshaler, org.robovm.apple.foundation.NSObject.NSKeyValueObserver, org.robovm.apple.foundation.NSObject.NSObjectPtr
Constructor and Description |
---|
MobileUILayout(java.lang.String layoutResource)
Creates a layout from the given XML-resource without binding context.
|
MobileUILayout(java.lang.String layoutResource,
boolean bindToTestObject)
Creates a layout for a given XML-resource and optionally binds to the
testObject that is embedded within the layout XML file. |
MobileUILayout(java.lang.String layoutResource,
java.lang.Object bindingContext)
Creates a layout from the given XML-resource binding to the given
bindingContext . |
Modifier and Type | Method and Description |
---|---|
void |
didMoveToWindow()
Internal API
|
void |
firePropertyChanged(java.lang.String... properties)
Fire a property change for this layout and bindingContext.
|
android.view.View |
getContentView()
Internal API
|
<T extends org.robovm.apple.uikit.UIView> |
getNativeView(java.lang.String id)
Returns the
UIView that is the delegate of the View carrying the given ID. |
void |
layoutSubviews()
Internal API
|
void |
onResourceUpdate(java.lang.String absoluteResourceName)
Internal API
|
execute, setFrame, setHeightMeasureSpec, setWidthMeasureSpec
addConstraint, addConstraints, addGestureRecognizer, addInteraction, addKeyframe, addLayoutGuide, addMotionEffect, addSubview, animate, animate, animate, animate, animateKeyframes, areAnimationsEnabled, autoresizesSubviews, beginAnimations, bringSubviewToFront, canBecomeFocused, clearsContextBeforeDrawing, clipsToBounds, commitAnimations, convertPointFromCoordinateSpace, convertPointFromView, convertPointToCoordinateSpace, convertPointToView, convertRectFromCoordinateSpace, convertRectFromView, convertRectToCoordinateSpace, convertRectToView, decodeRestorableState, didAddSubview, didHintFocusMovement, didMoveToSuperview, didUpdateFocus, displayLayer, draw, draw, drawLayer, drawViewHierarchy, encode, encodeRestorableState, endEditing, exchangeSubview, exerciseAmbiguityInLayout, focusItemsInRect, gestureRecognizerShouldBegin, getAccessibilityIdentifier, getAction, getAlignmentRectForFrame, getAlignmentRectInsets, getAlpha, getAutoresizingMask, getBackgroundColor, getBottomAnchor, getBounds, getCenter, getCenterXAnchor, getCenterYAnchor, getCollisionBoundingPath, getCollisionBoundsType, getConstraints, getConstraintsAffectingLayout, getContentCompressionResistancePriority, getContentHuggingPriority, getContentMode, getContentScaleFactor, getCoordinateSpace, getDirectionalLayoutMargins, getEffectiveUserInterfaceLayoutDirection, getFirstBaselineAnchor, getFocusItemContainer, getFrame, getFrameForAlignmentRect, getGestureRecognizers, getHeightAnchor, getInheritedAnimationDuration, getInteractions, getIntrinsicContentSize, getLastBaselineAnchor, getLayer, getLayerClass, getLayoutGuides, getLayoutMargins, getLayoutMarginsGuide, getLeadingAnchor, getLeftAnchor, getMaskView, getMotionEffects, getParentFocusEnvironment, getPreferredFocusedView, getPreferredFocusEnvironments, getReadableContentGuide, getResizableSnapshot, getRestorationIdentifier, getRightAnchor, getSafeAreaInsets, getSafeAreaLayoutGuide, getSemanticContentAttribute, getSizeThatFits, getSnapshot, getSubviews, getSuperview, getSystemLayoutSizeFittingSize, getSystemLayoutSizeFittingSize, getTag, getTintAdjustmentMode, getTintColor, getTopAnchor, getTrailingAnchor, getTraitCollection, getTransform, getUserInterfaceLayoutDirection, getUserInterfaceLayoutDirection, getViewForBaselineLayout, getViewForFirstBaselineLayout, getViewForLastBaselineLayout, getViewPrintFormatter, getViewWithTag, getWidthAnchor, getWindow, hasAmbiguousLayout, hitTest, insertSubview, insertSubviewAbove, insertSubviewBelow, invalidateIntrinsicContentSize, isAccessibilityIgnoresInvertColors, isDescendantOf, isExclusiveTouch, isFocused, isHidden, isInsetsLayoutMarginsFromSafeArea, isMultipleTouchEnabled, isOpaque, isPointInside, isUserInteractionEnabled, layoutIfNeeded, layoutMarginsDidChange, layoutSublayers, needsUpdateConstraints, NoIntrinsicMetric, performSystemAnimation, performWithoutAnimation, preservesSuperviewLayoutMargins, removeConstraint, removeConstraints, removeFromSuperview, removeGestureRecognizer, removeInteraction, removeLayoutGuide, removeMotionEffect, requiresConstraintBasedLayout, safeAreaInsetsDidChange, sendSubviewToBack, setAccessibilityIdentifier, setAccessibilityIgnoresInvertColors, setAlpha, setAnimationBeginsFromCurrentState, setAnimationCurve, setAnimationDelay, setAnimationDelegate, setAnimationDidStopSelector, setAnimationDurationInSeconds, setAnimationRepeatAutoreverses, setAnimationRepeatCount, setAnimationsEnabled, setAnimationStartDate, setAnimationTransition, setAnimationWillStartSelector, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setCenter, setClearsContextBeforeDrawing, setClipsToBounds, setContentCompressionResistancePriority, setContentHuggingPriority, setContentMode, setContentScaleFactor, setDirectionalLayoutMargins, setExclusiveTouch, setGestureRecognizers, setHidden, setInsetsLayoutMarginsFromSafeArea, setInteractions, setLayoutMargins, setMaskView, setMotionEffects, setMultipleTouchEnabled, setNeedsDisplay, setNeedsDisplay, setNeedsFocusUpdate, setNeedsLayout, setNeedsUpdateConstraints, setOpaque, setPreservesSuperviewLayoutMargins, setRestorationIdentifier, setSemanticContentAttribute, setTag, setTintAdjustmentMode, setTintColor, setTransform, setTranslatesAutoresizingMaskIntoConstraints, setUserInteractionEnabled, shouldUpdateFocus, sizeToFit, tintColorDidChange, traitCollectionDidChange, transition, transition, translatesAutoresizingMaskIntoConstraints, updateConstraints, updateConstraintsIfNeeded, updateFocusIfNeeded, willDrawLayer, willMoveToSuperview, willMoveToWindow, willRemoveSubview
areAccessibilityElementsHidden, becomeFirstResponder, canBecomeFirstResponder, canPerformAction, canResignFirstResponder, clearTextInputContextIdentifier, getAccessibilityActivationPoint, getAccessibilityAttributedHint, getAccessibilityAttributedLabel, getAccessibilityAttributedValue, getAccessibilityFrame, getAccessibilityHint, getAccessibilityLabel, getAccessibilityLanguage, getAccessibilityNavigationStyle, getAccessibilityPath, getAccessibilityTraits, getAccessibilityValue, getActionTarget, getInputAccessoryView, getInputAccessoryViewController, getInputAssistantItem, getInputView, getInputViewController, getKeyCommands, getNextResponder, getTextInputContextIdentifier, getTextInputMode, getUndoManager, getUserActivity, isAccessibilityElement, isAccessibilityViewModal, isFirstResponder, motionBegan, motionCancelled, motionEnded, pressesBegan, pressesCancelled, pressesChanged, pressesEnded, reloadInputViews, remoteControlReceived, resignFirstResponder, restoreUserActivityState, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedValue, setAccessibilityElement, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityTraits, setAccessibilityValue, setAccessibilityViewModal, setShouldGroupAccessibilityChildren, setUserActivity, shouldGroupAccessibilityChildren, touchesBegan, touchesCancelled, touchesEnded, touchesEstimatedPropertiesUpdated, touchesMoved, updateUserActivityState
addKeyValueObserver, addKeyValueObserver, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, equals, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValues
public MobileUILayout(java.lang.String layoutResource)
layoutResource
- path of the MobileUI layout within the assets folderpublic MobileUILayout(java.lang.String layoutResource, boolean bindToTestObject)
testObject
that is embedded within the layout XML file.layoutResource
- path of the MobileUI layout within the assets folderbindToTestObject
- flag to enable testObject
-bindingpublic MobileUILayout(java.lang.String layoutResource, java.lang.Object bindingContext)
bindingContext
.
The bindingContext can be any object that implements the properties and methods used in the
layout file.layoutResource
- path of the MobileUI layout within the assets folderbindingContext
- object to use as bindingContext for the given layoutpublic void didMoveToWindow()
didMoveToWindow
in class org.robovm.apple.uikit.UIView
public void layoutSubviews()
layoutSubviews
in class org.remoteui.client.ios.view.adapter.AbstractViewAdapter
public android.view.View getContentView()
getContentView
in class org.remoteui.client.ios.view.adapter.AbstractViewAdapter
public void onResourceUpdate(java.lang.String absoluteResourceName)
onResourceUpdate
in interface io.nevernull.mobileui.core.ResourceUpdateListener
absoluteResourceName
- internalpublic void firePropertyChanged(java.lang.String... properties)
firePropertyChanged
in interface io.nevernull.mobileui.core.PropertyFireListener
properties
- list of property names that have been changedpublic <T extends org.robovm.apple.uikit.UIView> T getNativeView(java.lang.String id)
UIView
that is the delegate of the View
carrying the given ID. The ID has been given
in the XML file with the id
attribute.T
- This implementation will automatically cast to the return type. Please be aware, that the internal
implementation of MobileUI might possibly change, leading to ClassCastException
.id
- ID as given in the XML file (id attribute)UIView
belonging to the View
that is marked with the ID or null.java.lang.ClassCastException
- if you try to assign the result to a wrong type.