CPC G06F 3/0481 (2013.01) [G06F 3/0484 (2013.01)] | 17 Claims |
1. A method comprising:
obtaining, at an electronic device, platform agnostic data that includes a set of views for a user interface;
identifying a view component in a view of the set of views from the platform agnostic data;
mapping, via a first type of metadata definition, the view component to an attribute-specific type of view component based on a form factor of the electronic device;
binding, via a second type of metadata definition, the attribute-specific type of view component to a class in a library that represents natively implemented platform-specific user-interface elements on the electronic device, wherein the binding comprises at least:
identifying a first rule from the second type of metadata definition to bind the attribute-specific type of view component to a platform-specific user interface element;
failing to identify any available platform-specific user-interface element on the electronic device based on the first rule; and
obtaining an alternative platform-specific user-interface element for rendering the view component from a generic rule in the second type of metadata definition;
obtaining one or more configuration options specific to the electronic device from the second type of metadata definition, wherein the one or more configuration options comprise modifications to a behavior of the alternative platform-specific user-interface element;
instantiating the alternative platform-specific user-interface element with the one or more configuration options based on a call to the library to render the view of the set of views; and
rendering the view of the set of views during execution of an application on the electronic device until use of the application is discontinued.
|